diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2022-10-14 13:48:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-14 13:48:33 +0100 |
commit | 97b3d037c043d5c91c2a36109cab0c668a6a13ed (patch) | |
tree | 863746d9124e38061ac0265f60f6367d54b2b722 | |
parent | Do not allow a None-limit on PaginationConfig. (#14146) (diff) | |
download | synapse-97b3d037c043d5c91c2a36109cab0c668a6a13ed.tar.xz |
Don't require optional `invite_room_state` field on fed v2 invite (#14083)
Diffstat (limited to '')
-rw-r--r-- | changelog.d/14083.bugfix | 1 | ||||
-rw-r--r-- | synapse/federation/transport/server/federation.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/14083.bugfix b/changelog.d/14083.bugfix new file mode 100644 index 0000000000..752982b1ca --- /dev/null +++ b/changelog.d/14083.bugfix @@ -0,0 +1 @@ +Fix a long-standing bug where Synapse would error on the optional 'invite_room_state' field not being provided to [`PUT /_matrix/federation/v2/invite/{roomId}/{eventId}`](https://spec.matrix.org/v1.4/server-server-api/#put_matrixfederationv2inviteroomideventid). \ No newline at end of file diff --git a/synapse/federation/transport/server/federation.py b/synapse/federation/transport/server/federation.py index 6bb4659c4c..6f11138b57 100644 --- a/synapse/federation/transport/server/federation.py +++ b/synapse/federation/transport/server/federation.py @@ -489,7 +489,7 @@ class FederationV2InviteServlet(BaseFederationServerServlet): room_version = content["room_version"] event = content["event"] - invite_room_state = content["invite_room_state"] + invite_room_state = content.get("invite_room_state", []) # Synapse expects invite_room_state to be in unsigned, as it is in v1 # API |