summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-08-28 23:25:38 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-08-28 23:25:38 +0100
commit095d4f27a118b2aade6922bdaed057804c1f14d8 (patch)
treeab84baecbcf9c33ef3015c159c11bb2a7279c8ec /synapse/handlers
parentMerge branch 'develop' into matthew/fix_overzealous_ll_state (diff)
downloadsynapse-095d4f27a118b2aade6922bdaed057804c1f14d8.tar.xz
Add comment
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/sync.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index ee1809019e..ef20c2296c 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -745,6 +745,13 @@ class SyncHandler(object):
                 state_ids = {}
                 if lazy_load_members:
                     if types:
+                        # We're returning an incremental sync, with no "gap" since
+                        # the previous sync, so normally there would be no state to return
+                        # But we're lazy-loading, so the client might need some more
+                        # member events to understand the events in this timeline.
+                        # So we fish out all the member events corresponding to the
+                        # timeline here, and then dedupe any redundant ones below.
+
                         state_ids = yield self.store.get_state_ids_for_event(
                             batch.events[0].event_id, types=types,
                             filtered_types=None,  # we only want members!