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

Commit b3a4b65

Browse files
committed
Only used the returned event from /send_join if the room version supports MSC3083.
1 parent fbe0038 commit b3a4b65

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

synapse/federation/federation_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,14 @@ async def send_join(
708708
async def send_request(destination) -> SendJoinResult:
709709
response = await self._do_send_join(room_version, destination, pdu)
710710

711-
# If an event was returned:
711+
# If an event was returned (and expected to be returned):
712712
#
713-
# * Ensure it has the same event ID.
713+
# * Ensure it has the same event ID (note that the event ID is a hash
714+
# of the event fields for versions which support MSC3083).
714715
# * Ensure the signatures are good.
715716
#
716717
# Otherwise, fallback to the provided event.
717-
if response.event:
718+
if room_version.msc3083_join_rules and response.event:
718719
event = response.event
719720

720721
valid_pdu = await self._check_sigs_and_hash_and_fetch_one(

0 commit comments

Comments
 (0)