Fix loading single messages from private peers

This commit is contained in:
Eduard Kuzmenko 2021-07-22 14:52:31 +03:00
parent 1d3572c3d9
commit a7c5e8bc42

View File

@ -5039,16 +5039,18 @@ export class AppMessagesManager {
id: msgIds
});
}
promises.push(promise.then(getMessagesResult => {
const after = promise.then(getMessagesResult => {
if(getMessagesResult._ !== 'messages.messagesNotModified') {
appUsersManager.saveApiUsers(getMessagesResult.users);
appChatsManager.saveApiChats(getMessagesResult.chats);
this.saveMessages(getMessagesResult.messages);
}
}).finally(() => {
rootScope.dispatchEvent('messages_downloaded', {peerId: +peerId, mids});
}));
});
promises.push(after);
}
Promise.all(promises).finally(() => {