summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-09-08 16:48:15 +0100
committerGitHub <noreply@github.com>2020-09-08 16:48:15 +0100
commit63c0e9e1954fc7fc10a2575c54aecc8944de60f3 (patch)
tree29b8c5045ba97f23e6ff4400654afebfe42779fb /synapse/handlers
parentAdd a config option for validating 'next_link' parameters against a domain wh... (diff)
downloadsynapse-63c0e9e1954fc7fc10a2575c54aecc8944de60f3.tar.xz
Add types to StreamToken and RoomStreamToken (#8279)
The intention here is to change `StreamToken.room_key` to be a `RoomStreamToken` in a future PR, but that is a big enough change without this refactoring too.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/sync.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index e2ddb628ff..cc47e8b62c 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -1310,12 +1310,11 @@ class SyncHandler:
         presence_source = self.event_sources.sources["presence"]
 
         since_token = sync_result_builder.since_token
+        presence_key = None
+        include_offline = False
         if since_token and not sync_result_builder.full_state:
             presence_key = since_token.presence_key
             include_offline = True
-        else:
-            presence_key = None
-            include_offline = False
 
         presence, presence_key = await presence_source.get_new_events(
             user=user,