Browse Source

Fixed message invalid peer bug

master
Igor Zhukov 10 years ago
parent
commit
ccab402f7c
  1. 10
      app/js/services.js

10
app/js/services.js

@ -1728,7 +1728,7 @@ angular.module('myApp.services', ['myApp.i18n']) @@ -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']) @@ -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']) @@ -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…
Cancel
Save