|
|
@ -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) |
|
|
|
|
|
|
|
if (dialog.top_message) { |
|
|
|
var mid = AppMessagesIDsManager.getFullMessageID(dialog.top_message, channelID) |
|
|
|
var mid = AppMessagesIDsManager.getFullMessageID(dialog.top_message, channelID) |
|
|
|
var message = getMessage(mid) |
|
|
|
var message = getMessage(mid) |
|
|
|
if (message.deleted) { |
|
|
|
} else { |
|
|
|
console.warn(dT(), 'Deleted message in coversaion', dialog, message, mid) |
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|