From a6e5798dd36c6e2fcfce7a8ff52a5e2e94acf301 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 10 Jun 2024 14:44:29 -0500 Subject: [PATCH] Explain why no `to_token` for global account data --- synapse/handlers/sliding_sync.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index e452c31cba..95edf6c54f 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -641,6 +641,9 @@ class SlidingSyncHandler: # `is_direct` on membership events because that property only appears for # the invitee membership event (doesn't show up for the inviter). Account # data is set by the client so it needs to be scrutinized. + # + # We're unable to take `to_token` into account for global account data since + # we only keep track of the latest account data for the user. dm_map = await self.store.get_global_account_data_by_type_for_user( user_id, AccountDataTypes.DIRECT )