Browse Source

Fixed empty conversation in pinned

master
Igor Zhukov 8 years ago
parent
commit
a86c249f63
  1. 22
      app/js/messages_manager.js

22
app/js/messages_manager.js

@ -136,10 +136,24 @@ angular.module('myApp.services')
SearchIndexManager.indexObject(peerID, peerText, dialogsIndex) SearchIndexManager.indexObject(peerID, peerText, dialogsIndex)
var isMegagroup = AppPeersManager.isMegagroup(channelID) var isMegagroup = AppPeersManager.isMegagroup(channelID)
var mid = AppMessagesIDsManager.getFullMessageID(dialog.top_message, channelID) if (dialog.top_message) {
var message = getMessage(mid) var mid = AppMessagesIDsManager.getFullMessageID(dialog.top_message, channelID)
if (message.deleted) { var message = getMessage(mid)
console.warn(dT(), 'Deleted message in coversaion', dialog, message, mid) } else {
var mid = tempID--
var message = {
_: 'message',
id: mid,
mid: mid,
from_id: AppUsersManager.getSelf().id,
to_id: AppPeersManager.getOutputPeer(peerID),
deleted: true,
flags: 0,
pFlags: {unread: false, out: true},
date: 0,
message: ''
}
saveMessages([message])
} }
var offsetDate = message.date var offsetDate = message.date

Loading…
Cancel
Save