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).
pull/12455/head
Patrick Cloke 2022-04-12 11:27:45 -04:00 committed by GitHub
parent ba1588461b
commit 4bdbebccb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 12 deletions

1
changelog.d/12395.misc Normal file
View File

@ -0,0 +1 @@
Remove an unstable identifier from [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083).

View File

@ -687,8 +687,6 @@ class FederationServer(FederationBase):
time_now = self._clock.time_msec() time_now = self._clock.time_msec()
event_json = event.get_pdu_json(time_now) event_json = event.get_pdu_json(time_now)
resp = { resp = {
# TODO Remove the unstable prefix when servers have updated.
"org.matrix.msc3083.v2.event": event_json,
"event": event_json, "event": event_json,
"state": [p.get_pdu_json(time_now) for p in state_events], "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], "auth_chain": [p.get_pdu_json(time_now) for p in auth_chain_events],

View File

@ -1380,16 +1380,6 @@ class SendJoinParser(ByteParser[SendJoinResponse]):
prefix + "auth_chain.item", prefix + "auth_chain.item",
use_float=True, 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( ijson.kvitems_coro(
_event_parser(self._response.event_dict), _event_parser(self._response.event_dict),
prefix + "event", prefix + "event",