Better insertion order
This commit is contained in:
@@ -230,6 +230,11 @@ export class Chat {
|
|||||||
TempDmDefs.isLogCreateMessage(log) &&
|
TempDmDefs.isLogCreateMessage(log) &&
|
||||||
TempDmDefs.isMessageView(log.message)
|
TempDmDefs.isMessageView(log.message)
|
||||||
) {
|
) {
|
||||||
|
if (this.newMessages.has(log.message.id)) {
|
||||||
|
// Trust the log as the source of truth on ordering
|
||||||
|
// TODO test this
|
||||||
|
this.newMessages.delete(log.message.id)
|
||||||
|
}
|
||||||
this.newMessages.set(log.message.id, log.message)
|
this.newMessages.set(log.message.id, log.message)
|
||||||
} else if (
|
} else if (
|
||||||
TempDmDefs.isLogDeleteMessage(log) &&
|
TempDmDefs.isLogDeleteMessage(log) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user