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

Commit c82c0ce

Browse files
committed
Ensure that /send_join and /make_join go to the same server.
1 parent 381cc8e commit c82c0ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

synapse/federation/federation_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,15 @@ async def _execute(pdu: EventBase) -> None:
818818
origin=destination,
819819
)
820820

821+
if room_version.msc3083_join_rules:
822+
# If the join is being authorised via allow rules, we need to send
823+
# the /send_join back to the same server that was originally used
824+
# with /make_join.
825+
if "join_authorised_via_users_server" in pdu.content:
826+
destinations = [
827+
get_domain_from_id(pdu.content["join_authorised_via_users_server"])
828+
]
829+
821830
return await self._try_destination_list("send_join", destinations, send_request)
822831

823832
async def _do_send_join(

0 commit comments

Comments
 (0)