Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 78114f9

Browse files
author
Mathieu Velten
committed
Use initial list of servers if we don't have the full state yet
Signed-off-by: Mathieu Velten <[email protected]>
1 parent d10a85e commit 78114f9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

synapse/federation/sender/__init__.py

+11
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,17 @@ async def handle_event(event: EventBase) -> None:
434434
# If there are no prev event IDs then the state is empty
435435
# and so no remote servers in the room
436436
destinations = set()
437+
elif await self.store.is_partial_state_room(event.room_id):
438+
# During partial join we use the set of servers that we got
439+
# when beginning the join. It's still possible that we send
440+
# events to servers that leaved the room in the meantine but
441+
# we consider that an acceptable risk since it is only our own
442+
# events that we leak and not other server's ones.
443+
destinations = (
444+
await self.store.get_partial_state_servers_at_join(
445+
event.room_id
446+
)
447+
)
437448
else:
438449
# We check the external cache for the destinations, which is
439450
# stored per state group.

0 commit comments

Comments
 (0)