Fix loading single messages from private peers
This commit is contained in:
parent
1d3572c3d9
commit
a7c5e8bc42
@ -5040,15 +5040,17 @@ export class AppMessagesManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
promises.push(promise.then(getMessagesResult => {
|
const after = promise.then(getMessagesResult => {
|
||||||
if(getMessagesResult._ !== 'messages.messagesNotModified') {
|
if(getMessagesResult._ !== 'messages.messagesNotModified') {
|
||||||
appUsersManager.saveApiUsers(getMessagesResult.users);
|
appUsersManager.saveApiUsers(getMessagesResult.users);
|
||||||
appChatsManager.saveApiChats(getMessagesResult.chats);
|
appChatsManager.saveApiChats(getMessagesResult.chats);
|
||||||
this.saveMessages(getMessagesResult.messages);
|
this.saveMessages(getMessagesResult.messages);
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
rootScope.dispatchEvent('messages_downloaded', {peerId: +peerId, mids});
|
rootScope.dispatchEvent('messages_downloaded', {peerId: +peerId, mids});
|
||||||
}));
|
});
|
||||||
|
|
||||||
|
promises.push(after);
|
||||||
}
|
}
|
||||||
|
|
||||||
Promise.all(promises).finally(() => {
|
Promise.all(promises).finally(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user