Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Ensure we mark sent knocks as outliers
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Sep 22, 2021
1 parent 4054dfa commit 0a49d98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/10873.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
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.
4 changes: 4 additions & 0 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,10 @@ async def do_knock(
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

# Record the room ID and its version so that we have a record of the room
await self._maybe_store_room_on_outlier_membership(
room_id=event.room_id, room_version=event_format_version
Expand Down

0 comments on commit 0a49d98

Please sign in to comment.