Fixed message invalid peer bug
This commit is contained in:
parent
9c3ae42065
commit
ccab402f7c
@ -1728,7 +1728,7 @@ angular.module('myApp.services', ['myApp.i18n'])
|
||||
|
||||
if (toID < 0) {
|
||||
return toID;
|
||||
} else if (message.out) {
|
||||
} else if (message.out || message.flags & 2) {
|
||||
return toID;
|
||||
}
|
||||
return message.from_id;
|
||||
@ -2032,10 +2032,6 @@ angular.module('myApp.services', ['myApp.i18n'])
|
||||
peerID = getMessagePeer(message),
|
||||
historyStorage = historiesStorage[peerID];
|
||||
|
||||
if (!message.out) {
|
||||
AppUsersManager.forceUserOnline(message.from_id);
|
||||
}
|
||||
|
||||
if (historyStorage !== undefined) {
|
||||
var topMsgID = historiesStorage[peerID].history[0];
|
||||
if (historiesStorage[peerID].history.indexOf(message.id) != -1) {
|
||||
@ -2055,6 +2051,10 @@ angular.module('myApp.services', ['myApp.i18n'])
|
||||
|
||||
saveMessages([message]);
|
||||
|
||||
if (!message.out) {
|
||||
AppUsersManager.forceUserOnline(message.from_id);
|
||||
}
|
||||
|
||||
if (historyStorage.count !== null) {
|
||||
historyStorage.count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user