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.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index 0df979cb01..011c711ec1 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -195,6 +195,14 @@ class UserDirectoryStore(SQLBaseStore):
             "get_current_state_deltas", self.cursor_to_dict, sql, prev_stream_id
         )
 
+    def get_max_stream_id_in_current_state_deltas(self):
+        return self._simple_select_one_onecol(
+            table="current_state_delta_stream",
+            keyvalues={},
+            retcol="COALESCE(MAX(stream_id), -1)",
+            desc="get_max_stream_id_in_current_state_deltas",
+        )
+
     @defer.inlineCallbacks
     def search_user_dir(self, search_term, limit):
         """Searches for users in directory