diff options
author | Erik Johnston <erik@matrix.org> | 2017-05-31 15:13:49 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-05-31 15:13:49 +0100 |
commit | dc51af3d031030fdf553f8478f7930596f2694f7 (patch) | |
tree | 9871098479d66f5c4941acfaceab710293da505e /synapse/storage | |
parent | Handle the server leaving a public room (diff) | |
download | synapse-dc51af3d031030fdf553f8478f7930596f2694f7.tar.xz |
Pull max id from correct table
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/user_directory.py | 8 |
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 |