summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-09-26 11:00:26 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-09-26 11:00:26 +0100
commit2e0d2879d0770572de72b1e90ba5055a1a5972e3 (patch)
tree85ae5ed62b1ad7b8b9698fad6d28db7970a029ce /synapse/handlers/sync.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentMerge pull request #3911 from matrix-org/jcgruenhage/docker-support-python3 (diff)
downloadsynapse-2e0d2879d0770572de72b1e90ba5055a1a5972e3.tar.xz
Merge branch 'develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py

index 5d96ee799d..fa016cfcbe 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py
@@ -717,10 +717,6 @@ class SyncHandler(object): ) ] - # always make sure we LL ourselves so we know we're in the room - # (if we are), to fix https://github.com/vector-im/riot-web/issues/7209 - types.append((EventTypes.Member, sync_config.user.to_string())) - # only apply the filtering to room members filtered_types = [EventTypes.Member] @@ -730,6 +726,13 @@ class SyncHandler(object): } if full_state: + if lazy_load_members: + # always make sure we LL ourselves so we know we're in the room + # (if we are) to fix https://github.com/vector-im/riot-web/issues/7209 + # We only need apply this on full state syncs given we disabled + # LL for incr syncs in #3840. + types.append((EventTypes.Member, sync_config.user.to_string())) + if batch: current_state_ids = yield self.store.get_state_ids_for_event( batch.events[-1].event_id, types=types, @@ -798,7 +801,7 @@ class SyncHandler(object): else: state_ids = {} if lazy_load_members: - if types: + if types and batch.events: # We're returning an incremental sync, with no # "gap" since the previous sync, so normally there would be # no state to return.