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

Commit

Permalink
Stop returning unsigned.invite_room_state in `PUT /_matrix/federati…
Browse files Browse the repository at this point in the history
…on/v2/invite/{roomId}/{eventId}` responses (#14064)

Co-authored-by: David Robertson <[email protected]>
  • Loading branch information
anoadragon453 and David Robertson authored Oct 20, 2022
1 parent 09c602b commit da2c93d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/14064.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where Synapse would accidentally include extra information in the response to [`PUT /_matrix/federation/v2/invite/{roomId}/{eventId}`](https://spec.matrix.org/v1.4/server-server-api/#put_matrixfederationv2inviteroomideventid).
5 changes: 5 additions & 0 deletions synapse/federation/transport/server/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ async def on_PUT(
result = await self.handler.on_invite_request(
origin, event, room_version_id=room_version
)

# We only store invite_room_state for internal use, so remove it before
# returning the event to the remote homeserver.
result["event"].get("unsigned", {}).pop("invite_room_state", None)

return 200, result


Expand Down

0 comments on commit da2c93d

Please sign in to comment.