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

Commit

Permalink
Add an assertion to _run_push_actions_and_persist_event
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Sep 8, 2021
1 parent b95c08f commit c204971
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions synapse/handlers/federation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,10 +1700,13 @@ async def _run_push_actions_and_persist_event(
context: The event context.
backfilled: True if the event was backfilled.
"""
# this method should not be called on outliers (those code paths call
# persist_events_and_notify directly.)
assert not event.internal_metadata.outlier

try:
if (
not event.internal_metadata.is_outlier()
and not backfilled
not backfilled
and not context.rejected
and (await self._store.get_min_depth(event.room_id)) <= event.depth
):
Expand Down

0 comments on commit c204971

Please sign in to comment.