fix: Sort state events of history requests correctly

This commit is contained in:
Sorunome 2020-12-27 10:55:41 +01:00
parent 1fff05d663
commit c6f718adcc
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 3 additions and 4 deletions

View File

@ -1015,10 +1015,9 @@ class Client extends MatrixApi {
if (room is JoinedRoomUpdate) {
if (room.state?.isNotEmpty ?? false) {
// TODO: This method seems to be comperatively slow for some updates
await _handleRoomEvents(
id,
room.state.map((i) => i.toJson()).toList(),
EventUpdateType.state);
await _handleRoomEvents(id,
room.state.map((i) => i.toJson()).toList(), EventUpdateType.state,
sortAtTheEnd: sortAtTheEnd);
handledEvents = true;
}
if (room.timeline?.events?.isNotEmpty ?? false) {