summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-24 11:04:35 +0100
committerErik Johnston <erik@matrix.org>2016-05-24 11:15:05 +0100
commitb08ad0389e0e412798f32d9f5656db483238173d (patch)
tree0a179cb0ee5f5860517fb2db5601d438c4a6cab1 /synapse/handlers/sync.py
parentSpell builder correctly (diff)
downloadsynapse-b08ad0389e0e412798f32d9f5656db483238173d.tar.xz
Only include non-offline presence in initial sync
Diffstat (limited to '')
-rw-r--r--synapse/handlers/sync.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 12a4cc8b57..8143171c11 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -606,13 +606,16 @@ class SyncHandler(object):
         since_token = sync_result_builder.since_token
         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 = yield presence_source.get_new_events(
             user=user,
             from_key=presence_key,
             is_guest=sync_config.is_guest,
+            include_offline=include_offline,
         )
         sync_result_builder.now_token = now_token.copy_and_replace(
             "presence_key", presence_key