diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py index 799aaf2e1a12..9ec90ac8c101 100644 --- a/synapse/handlers/federation_event.py +++ b/synapse/handlers/federation_event.py @@ -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 ):