diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2022-10-12 14:37:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 14:37:20 +0100 |
commit | 9c23442ac909afe3d827534b00d52ee182d2f423 (patch) | |
tree | df4952945972b59cd88f996840bb409be3d61090 /synapse/federation | |
parent | Bump bleach from 4.1.0 to 5.0.1 (#14116) (diff) | |
download | synapse-9c23442ac909afe3d827534b00d52ee182d2f423.tar.xz |
Correct field name for stripped state events when knocking. `knock_state_events` -> `knock_room_state` (#14102)
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_client.py | 2 | ||||
-rw-r--r-- | synapse/federation/federation_server.py | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index 4dca711cd2..b220ab43fc 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -1294,7 +1294,7 @@ class FederationClient(FederationBase): return resp[1] async def send_knock(self, destinations: List[str], pdu: EventBase) -> JsonDict: - """Attempts to send a knock event to given a list of servers. Iterates + """Attempts to send a knock event to a given list of servers. Iterates through the list until one attempt succeeds. Doing so will cause the remote server to add the event to the graph, diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 907940e19e..28097664b4 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -824,7 +824,14 @@ class FederationServer(FederationBase): context, self._room_prejoin_state_types ) ) - return {"knock_state_events": stripped_room_state} + return { + "knock_room_state": stripped_room_state, + # Since v1.37, Synapse incorrectly used "knock_state_events" for this field. + # Thus, we also populate a 'knock_state_events' with the same content to + # support old instances. + # See https://github.com/matrix-org/synapse/issues/14088. + "knock_state_events": stripped_room_state, + } async def _on_send_membership_event( self, origin: str, content: JsonDict, membership_type: str, room_id: str |