From cc3a1d4922035db8421ecf1871c100f4157924b6 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 8 Oct 2024 10:29:49 +0100 Subject: [PATCH] Comment always_return_bump_stamp --- synapse/handlers/sliding_sync/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/synapse/handlers/sliding_sync/__init__.py b/synapse/handlers/sliding_sync/__init__.py index 200299c8da0..42ae9f2c47e 100644 --- a/synapse/handlers/sliding_sync/__init__.py +++ b/synapse/handlers/sliding_sync/__init__.py @@ -1053,8 +1053,16 @@ async def get_room_sync_data( bump_stamp = None always_return_bump_stamp = ( + # We use the membership event position for any non-join room_membership_for_user_at_to_token.membership != Membership.JOIN - or limited is not False + # We didn't fetch any timeline events but we should still check for + # a bump_stamp that might be somewhere + or limited is None + # There might be a bump event somewhere before the timeline events + # that we fetched, that we didn't previously send down + or limited is True + # Always give the client some frame of reference if this is the + # first time they are seeing the room down the connection or initial )