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

Commit

Permalink
Avoid generating state groups for local out-of-band leaves (#12154)
Browse files Browse the repository at this point in the history
If we locally generate a rejection for an invite received over federation, it
is stored as an outlier (because we probably don't have the state for the
room). However, currently we still generate a state group for it (even though
the state in that state group will be nonsense).

By setting the `outlier` param on `create_event`, we avoid the nonsensical
state.
  • Loading branch information
richvdh authored Mar 3, 2022
1 parent fb0ffa9 commit 8533c8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/12154.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid generating state groups for local out-of-band leaves.
2 changes: 1 addition & 1 deletion synapse/handlers/room_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,8 +1736,8 @@ async def _generate_local_out_of_band_leave(
txn_id=txn_id,
prev_event_ids=prev_event_ids,
auth_event_ids=auth_event_ids,
outlier=True,
)
event.internal_metadata.outlier = True
event.internal_metadata.out_of_band_membership = True

result_event = await self.event_creation_handler.handle_new_client_event(
Expand Down

0 comments on commit 8533c8b

Please sign in to comment.