fix: Auto update room states

Room states are ignored if the event with the same event ID
is already known in the database. But
because of the event is stored in the
database and after this
setState in the Room class is called,
an event is always "known" and
therefore auto updating was broken.
This commit is contained in:
Krille Fear 2021-10-25 10:55:54 +02:00
parent b5ca69ead3
commit 9193950970
1 changed files with 1 additions and 1 deletions

View File

@ -1430,10 +1430,10 @@ class Client extends MatrixApi {
room.setState(user);
}
}
_updateRoomsByEventUpdate(update);
if (type != EventUpdateType.ephemeral && database != null) {
await database.storeEventUpdate(update);
}
_updateRoomsByEventUpdate(update);
if (encryptionEnabled) {
await encryption.handleEventUpdate(update);
}