From 4bdbebccb98bcc0e8862b1e8b532d9a491a90dac Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 12 Apr 2022 11:27:45 -0400 Subject: [PATCH] Remove the unstable event field for `/send_join` per MSC3083. (#12395) This was missed when initially stabilising room version 8 and was left in as a compatibility shim. Most homeservers have upgraded to a version which expects the proper field name, and the failure mode is reasonable (a user on an older server may have to attempt joining the room twice with an obscure error message the first time). --- changelog.d/12395.misc | 1 + synapse/federation/federation_server.py | 2 -- synapse/federation/transport/client.py | 10 ---------- 3 files changed, 1 insertion(+), 12 deletions(-) create mode 100644 changelog.d/12395.misc diff --git a/changelog.d/12395.misc b/changelog.d/12395.misc new file mode 100644 index 0000000000..0a2123b294 --- /dev/null +++ b/changelog.d/12395.misc @@ -0,0 +1 @@ +Remove an unstable identifier from [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083). diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 69d833585f..e67af6463f 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -687,8 +687,6 @@ class FederationServer(FederationBase): time_now = self._clock.time_msec() event_json = event.get_pdu_json(time_now) resp = { - # TODO Remove the unstable prefix when servers have updated. - "org.matrix.msc3083.v2.event": event_json, "event": event_json, "state": [p.get_pdu_json(time_now) for p in state_events], "auth_chain": [p.get_pdu_json(time_now) for p in auth_chain_events], diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index 01dc5ca94f..1421050b9a 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -1380,16 +1380,6 @@ class SendJoinParser(ByteParser[SendJoinResponse]): prefix + "auth_chain.item", use_float=True, ), - # TODO Remove the unstable prefix when servers have updated. - # - # By re-using the same event dictionary this will cause the parsing of - # org.matrix.msc3083.v2.event and event to stomp over each other. - # Generally this should be fine. - ijson.kvitems_coro( - _event_parser(self._response.event_dict), - prefix + "org.matrix.msc3083.v2.event", - use_float=True, - ), ijson.kvitems_coro( _event_parser(self._response.event_dict), prefix + "event",