Correct field name for stripped state events when knocking. knock_state_events -> knock_room_state (#14102)

This commit is contained in:
Andrew Morgan 2022-10-12 14:37:20 +01:00 committed by GitHub
parent c152e58116
commit 9c23442ac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 6 deletions

View file

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