Just-in-case sort of synced messages

This commit is contained in:
Andrew Ferrazzutti 2021-04-03 03:11:05 -04:00
parent 510018a51d
commit fa6d3b5279

View File

@ -584,7 +584,9 @@ export default class MessagesPuppeteer {
this.log("Waiting for messages to load")
const messages = await this.page.evaluate(
id => window.__mautrixController.parseMessageList(id), id)
return messages.filter(msg => msg.id > minID && !this.sentMessageIDs.has(msg.id))
return messages.
filter(msg => msg.id > minID && !this.sentMessageIDs.has(msg.id).
sort((a,b) => a.id - b.id) // TODO Confirm whether this sort is really needed
}
async _processChatListChangeUnsafe(id) {