summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-03-18 21:40:35 +0000
committerMatthew Hodgson <matthew@matrix.org>2018-03-18 21:40:43 +0000
commit366f730bf697fe8fbb18a509ec1852987bc80410 (patch)
treece81764b583b9eb493a8823a27f1103325e60cf6 /synapse
parentremove stale import (diff)
downloadsynapse-366f730bf697fe8fbb18a509ec1852987bc80410.tar.xz
only get member state IDs for incremental syncs if we're filtering
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/sync.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index b7f42bd594..6b57afd97b 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -557,14 +557,14 @@ class SyncHandler(object):
                     current=current_state_ids,
                 )
             else:
+                state_ids = {}
                 if filter_members:
                     # strip off the (None, None) and filter to just room members
                     types = types[:-1]
-                    state_ids = yield self.store.get_state_ids_for_event(
-                        batch.events[0].event_id, types=types
-                    )
-                else:
-                    state_ids = {}
+                    if types:
+                        state_ids = yield self.store.get_state_ids_for_event(
+                            batch.events[0].event_id, types=types
+                        )
 
         state = {}
         if state_ids: