summary refs log tree commit diff
path: root/synapse/handlers/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/handlers/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/handlers/user_directory.py')
-rw-r--r--synapse/handlers/user_directory.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py
index 4e491a43e6..8331f6422e 100644
--- a/synapse/handlers/user_directory.py
+++ b/synapse/handlers/user_directory.py
@@ -111,9 +111,7 @@ class UserDirectoyHandler(object):
         """Populates the user_directory from the current state of the DB, used
         when synapse first starts with user_directory support
         """
-
-        # TODO: pull from current delta stream_id
-        new_pos = self.store.get_room_max_stream_ordering()
+        new_pos = yield self.store.get_max_stream_id_in_current_state_deltas()
 
         # Delete any existing entries just in case there are any
         yield self.store.delete_all_from_user_dir()
@@ -284,7 +282,7 @@ class UserDirectoyHandler(object):
             # is public (i.e. the room_id in the database)
             return
 
-        # TODO: Make this faster?
+        # XXX: Make this faster?
         rooms = yield self.store.get_rooms_for_user(user_id)
         for j_room_id in rooms:
             is_public = yield self.store.is_room_world_readable_or_publicly_joinable(