Selaa lähdekoodia

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).
tags/v1.58.0rc1
Patrick Cloke 2 vuotta sitten
committed by GitHub
vanhempi
commit
4bdbebccb9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 muutettua tiedostoa jossa 1 lisäystä ja 12 poistoa
  1. +1
    -0
      changelog.d/12395.misc
  2. +0
    -2
      synapse/federation/federation_server.py
  3. +0
    -10
      synapse/federation/transport/client.py

+ 1
- 0
changelog.d/12395.misc Näytä tiedosto

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

+ 0
- 2
synapse/federation/federation_server.py Näytä tiedosto

@@ -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],


+ 0
- 10
synapse/federation/transport/client.py Näytä tiedosto

@@ -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",


Ladataan…
Peruuta
Tallenna