|
|
@ -1728,7 +1728,7 @@ angular.module('myApp.services', ['myApp.i18n']) |
|
|
|
|
|
|
|
|
|
|
|
if (toID < 0) { |
|
|
|
if (toID < 0) { |
|
|
|
return toID; |
|
|
|
return toID; |
|
|
|
} else if (message.out) { |
|
|
|
} else if (message.out || message.flags & 2) { |
|
|
|
return toID; |
|
|
|
return toID; |
|
|
|
} |
|
|
|
} |
|
|
|
return message.from_id; |
|
|
|
return message.from_id; |
|
|
@ -2032,10 +2032,6 @@ angular.module('myApp.services', ['myApp.i18n']) |
|
|
|
peerID = getMessagePeer(message), |
|
|
|
peerID = getMessagePeer(message), |
|
|
|
historyStorage = historiesStorage[peerID]; |
|
|
|
historyStorage = historiesStorage[peerID]; |
|
|
|
|
|
|
|
|
|
|
|
if (!message.out) { |
|
|
|
|
|
|
|
AppUsersManager.forceUserOnline(message.from_id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (historyStorage !== undefined) { |
|
|
|
if (historyStorage !== undefined) { |
|
|
|
var topMsgID = historiesStorage[peerID].history[0]; |
|
|
|
var topMsgID = historiesStorage[peerID].history[0]; |
|
|
|
if (historiesStorage[peerID].history.indexOf(message.id) != -1) { |
|
|
|
if (historiesStorage[peerID].history.indexOf(message.id) != -1) { |
|
|
@ -2055,6 +2051,10 @@ angular.module('myApp.services', ['myApp.i18n']) |
|
|
|
|
|
|
|
|
|
|
|
saveMessages([message]); |
|
|
|
saveMessages([message]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!message.out) { |
|
|
|
|
|
|
|
AppUsersManager.forceUserOnline(message.from_id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (historyStorage.count !== null) { |
|
|
|
if (historyStorage.count !== null) { |
|
|
|
historyStorage.count++; |
|
|
|
historyStorage.count++; |
|
|
|
} |
|
|
|
} |
|
|
|