From d201b45d512490cbe9768de37733e3808dde4f4e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 27 Apr 2026 10:26:52 +0100 Subject: [PATCH] Add note about using 'now_token' --- synapse/handlers/sliding_sync/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/synapse/handlers/sliding_sync/__init__.py b/synapse/handlers/sliding_sync/__init__.py index a3443b300c..16497a3bd4 100644 --- a/synapse/handlers/sliding_sync/__init__.py +++ b/synapse/handlers/sliding_sync/__init__.py @@ -196,6 +196,12 @@ class SlidingSyncHandler: sync_config.user.to_string(), timeout_ms, current_sync_callback, + # We *wait* from `now_token` as we have already computed the sync + # response up to `now_token` above, so we want to wait for something + # new to arrive after `now_token`. + # + # We still generate the sync response using `from_token` in the + # callback above though. from_token=now_token, ) did_wait = True