diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 7c29c155402..410805e806e 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -1272,8 +1272,11 @@ async def _compute_state_delta_for_incremental_sync( for e in batch.events[1:]: if e.prev_event_ids() != [prev_event_id]: break + prev_event_id = e.event_id else: is_linear_timeline = True + else: + is_linear_timeline = True if is_linear_timeline and not batch.limited: state_ids: StateMap[str] = {}