Only include non-offline presence in initial sync

This commit is contained in:
Erik Johnston 2016-05-24 11:04:35 +01:00
parent be2c677386
commit b08ad0389e
1 changed files with 3 additions and 0 deletions

View File

@ -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