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:
parent
b5ca69ead3
commit
9193950970
|
|
@ -1430,10 +1430,10 @@ class Client extends MatrixApi {
|
||||||
room.setState(user);
|
room.setState(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_updateRoomsByEventUpdate(update);
|
||||||
if (type != EventUpdateType.ephemeral && database != null) {
|
if (type != EventUpdateType.ephemeral && database != null) {
|
||||||
await database.storeEventUpdate(update);
|
await database.storeEventUpdate(update);
|
||||||
}
|
}
|
||||||
_updateRoomsByEventUpdate(update);
|
|
||||||
if (encryptionEnabled) {
|
if (encryptionEnabled) {
|
||||||
await encryption.handleEventUpdate(update);
|
await encryption.handleEventUpdate(update);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue