mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-20 04:24:19 -05:00
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)
This commit is contained in:
parent
5db2a59a86
commit
f6f92845f8
1
changelog.d/7548.bugfix
Normal file
1
changelog.d/7548.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix bug where a local user leaving a room could fail under rare circumstances.
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user