Skip to content
Snippets Groups Projects
Unverified Commit 8f2a5276 authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Ensure we mark sent knocks as outliers (#10873)

parent 6fc8be9a
Branches
Tags
No related merge requests found
Fix a bug introduced in Synapse 1.37.0 which caused `knock` events which we sent to remote servers to be incorrectly stored in the local database.
...@@ -593,6 +593,13 @@ class FederationHandler(BaseHandler): ...@@ -593,6 +593,13 @@ class FederationHandler(BaseHandler):
target_hosts, room_id, knockee, Membership.KNOCK, content, params=params target_hosts, room_id, knockee, Membership.KNOCK, content, params=params
) )
# Mark the knock as an outlier as we don't yet have the state at this point in
# the DAG.
event.internal_metadata.outlier = True
# ... but tell /sync to send it to clients anyway.
event.internal_metadata.out_of_band_membership = True
# Record the room ID and its version so that we have a record of the room # Record the room ID and its version so that we have a record of the room
await self._maybe_store_room_on_outlier_membership( await self._maybe_store_room_on_outlier_membership(
room_id=event.room_id, room_version=event_format_version room_id=event.room_id, room_version=event_format_version
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment