summary refs log tree commit diff
path: root/synapse/storage/user_directory.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/user_directory.py')
-rw-r--r--synapse/storage/user_directory.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index b1957cb873..15b8ea0460 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -204,7 +204,9 @@ class UserDirectoryStore(SQLBaseStore):
         )
 
     def get_current_state_deltas(self, prev_stream_id):
-        # TODO: Add stream change cache
+        if not self._curr_state_delta_stream_cache.has_any_entity_changed(prev_stream_id):
+            return []
+
         # TODO: Add limit
         sql = """
             SELECT stream_id, room_id, type, state_key, event_id, prev_event_id