diff options
author | Erik Johnston <erik@matrix.org> | 2020-05-21 13:20:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 13:20:10 +0100 |
commit | f6f92845f84301619f4c48eed9364b25db0b1445 (patch) | |
tree | 7301c49a20aaf824fa5962b8de4628dacca33c58 /synapse | |
parent | Update CONTRIBUTING.md (#7541) (diff) | |
download | synapse-f6f92845f84301619f4c48eed9364b25db0b1445.tar.xz |
Fix bug in persist events when dealing with non member types. (#7548)
`_is_server_still_joined` will throw if it is given state updates with non-user ID state keys with local user leaves. This is actually rarely a problem since local leaves almost always get persisted by themselves. (I discovered this on a branch that was otherwise broken, so I haven't seen this in the wild)
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/persist_events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/persist_events.py b/synapse/storage/persist_events.py index 41881ea20b..12e1ffb9a2 100644 --- a/synapse/storage/persist_events.py +++ b/synapse/storage/persist_events.py @@ -740,8 +740,8 @@ class EventsPersistenceStorage(object): # whose state has changed as we've already their new state above. users_to_ignore = [ state_key - for _, state_key in itertools.chain(delta.to_insert, delta.to_delete) - if self.is_mine_id(state_key) + for typ, state_key in itertools.chain(delta.to_insert, delta.to_delete) + if typ == EventTypes.Member and self.is_mine_id(state_key) ] if await self.main_store.is_local_host_in_room_ignoring_users( |