Merge branch 'soru/fix-history-state-events' into 'main'

fix: Sort state events of history requests correctly

See merge request famedly/famedlysdk!586
This commit is contained in:
Christian Pauly 2020-12-28 07:42:33 +00:00
commit c69a8ac927
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 is JoinedRoomUpdate) {
if (room.state?.isNotEmpty ?? false) { if (room.state?.isNotEmpty ?? false) {
// TODO: This method seems to be comperatively slow for some updates // TODO: This method seems to be comperatively slow for some updates
await _handleRoomEvents( await _handleRoomEvents(id,
id, room.state.map((i) => i.toJson()).toList(), EventUpdateType.state,
room.state.map((i) => i.toJson()).toList(), sortAtTheEnd: sortAtTheEnd);
EventUpdateType.state);
handledEvents = true; handledEvents = true;
} }
if (room.timeline?.events?.isNotEmpty ?? false) { if (room.timeline?.events?.isNotEmpty ?? false) {