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

Commit 97b3d03

Browse files
Don't require optional invite_room_state field on fed v2 invite (#14083)
1 parent 126a157 commit 97b3d03

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/14083.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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).

synapse/federation/transport/server/federation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ async def on_PUT(
489489

490490
room_version = content["room_version"]
491491
event = content["event"]
492-
invite_room_state = content["invite_room_state"]
492+
invite_room_state = content.get("invite_room_state", [])
493493

494494
# Synapse expects invite_room_state to be in unsigned, as it is in v1
495495
# API

0 commit comments

Comments
 (0)