Browse Source

Fixed empty conversation in pinned

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

18
app/js/messages_manager.js

@ -136,10 +136,24 @@ angular.module('myApp.services') @@ -136,10 +136,24 @@ angular.module('myApp.services')
SearchIndexManager.indexObject(peerID, peerText, dialogsIndex)
var isMegagroup = AppPeersManager.isMegagroup(channelID)
if (dialog.top_message) {
var mid = AppMessagesIDsManager.getFullMessageID(dialog.top_message, channelID)
var message = getMessage(mid)
if (message.deleted) {
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

Loading…
Cancel
Save