diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-09-25 12:03:54 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-09-25 12:03:54 +0100 |
commit | a1cd37390f35ff814be2d2e1428af83b852c5d2a (patch) | |
tree | 56617045f76b6ba1c4deb60a2c48e0f3c663f178 /synapse/handlers/sync.py | |
parent | Fix ExpiringCache.__len__ to be accurate (diff) | |
parent | Merge pull request #3932 from matrix-org/erikj/auto_start_expiring_caches (diff) | |
download | synapse-a1cd37390f35ff814be2d2e1428af83b852c5d2a.tar.xz |
Merge remote-tracking branch 'origin/develop' into erikj/destination_retry_cache
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r-- | synapse/handlers/sync.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index b598916b21..c7d69d9d80 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -713,10 +713,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] @@ -726,6 +722,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, @@ -794,7 +797,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. |