summary refs log tree commit diff
path: root/synapse/storage/user_directory.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-31 15:13:49 +0100
committerErik Johnston <erik@matrix.org>2017-05-31 15:13:49 +0100
commitdc51af3d031030fdf553f8478f7930596f2694f7 (patch)
tree9871098479d66f5c4941acfaceab710293da505e /synapse/storage/user_directory.py
parentHandle the server leaving a public room (diff)
downloadsynapse-dc51af3d031030fdf553f8478f7930596f2694f7.tar.xz
Pull max id from correct table
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