mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 18:44:56 -04:00
Wait for lazy join to complete when getting current state (#12872)
This commit is contained in:
parent
782cb7420a
commit
888a29f412
33 changed files with 361 additions and 82 deletions
|
@ -994,7 +994,7 @@ class EventsPersistenceStorageController:
|
|||
|
||||
Assumes that we are only persisting events for one room at a time.
|
||||
"""
|
||||
existing_state = await self.main_store.get_current_state_ids(room_id)
|
||||
existing_state = await self.main_store.get_partial_current_state_ids(room_id)
|
||||
|
||||
to_delete = [key for key in existing_state if key not in current_state]
|
||||
|
||||
|
@ -1083,7 +1083,7 @@ class EventsPersistenceStorageController:
|
|||
# The server will leave the room, so we go and find out which remote
|
||||
# users will still be joined when we leave.
|
||||
if current_state is None:
|
||||
current_state = await self.main_store.get_current_state_ids(room_id)
|
||||
current_state = await self.main_store.get_partial_current_state_ids(room_id)
|
||||
current_state = dict(current_state)
|
||||
for key in delta.to_delete:
|
||||
current_state.pop(key, None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue