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

Commit 696acd3

Browse files
authored
send_join response: get create event from state, not auth_chain (#12005)
msc3706 proposes changing the `/send_join` response: > Any events returned within `state` can be omitted from `auth_chain`. Currently, we rely on `m.room.create` being returned in `auth_chain`, but since the `m.room.create` event must necessarily be part of the state, the above change will break this. In short, let's look for `m.room.create` in `state` rather than `auth_chain`.
1 parent 4077177 commit 696acd3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/12005.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Preparation for faster-room-join work: when parsing the `send_join` response, get the `m.room.create` event from `state`, not `auth_chain`.

synapse/handlers/federation_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ async def process_remote_join(
420420
SynapseError if the response is in some way invalid.
421421
"""
422422
create_event = None
423-
for e in auth_events:
423+
for e in state:
424424
if (e.type, e.state_key) == (EventTypes.Create, ""):
425425
create_event = e
426426
break

0 commit comments

Comments
 (0)