fix: Last message sort order

This commit is contained in:
Christian Pauly 2020-09-04 09:48:35 +02:00
parent 9142dcbeec
commit e90793bef1
1 changed files with 3 additions and 3 deletions

View File

@ -1104,9 +1104,9 @@ class Client extends MatrixApi {
);
} else {
var prevState = rooms[j].getState(stateEvent.type, stateEvent.stateKey);
if (prevState != null &&
prevState.originServerTs.millisecondsSinceEpoch >
stateEvent.originServerTs.millisecondsSinceEpoch) return;
if (prevState != null && prevState.sortOrder > stateEvent.sortOrder) {
return;
}
rooms[j].setState(stateEvent);
}
} else if (eventUpdate.type == 'account_data') {