summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2022-10-20 15:17:45 +0100
committerGitHub <noreply@github.com>2022-10-20 15:17:45 +0100
commitda2c93d4b69200c1ea9fb94ec3c951fd4b424864 (patch)
treea655a17b67cbf7044dd2769362bccd4487806579 /synapse
parentMerge branch 'release-v1.70' into develop (diff)
downloadsynapse-da2c93d4b69200c1ea9fb94ec3c951fd4b424864.tar.xz
Stop returning `unsigned.invite_room_state` in `PUT /_matrix/federation/v2/invite/{roomId}/{eventId}` responses (#14064)
Co-authored-by: David Robertson <davidr@element.io>
Diffstat (limited to 'synapse')
-rw-r--r--synapse/federation/transport/server/federation.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/federation/transport/server/federation.py b/synapse/federation/transport/server/federation.py
index 6f11138b57..205fd16daa 100644
--- a/synapse/federation/transport/server/federation.py
+++ b/synapse/federation/transport/server/federation.py
@@ -499,6 +499,11 @@ class FederationV2InviteServlet(BaseFederationServerServlet):
         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