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`.
This commit is contained in:
Richard van der Hoff 2022-02-17 11:59:26 +00:00 committed by GitHub
parent 4077177390
commit 696acd3515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -420,7 +420,7 @@ class FederationEventHandler:
SynapseError if the response is in some way invalid.
"""
create_event = None
for e in auth_events:
for e in state:
if (e.type, e.state_key) == (EventTypes.Create, ""):
create_event = e
break