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 11:56:27 +0100
committerErik Johnston <erik@matrix.org>2017-05-31 11:56:27 +0100
commit3e123b84977f84f4c60ebafadda9b381baa9d00f (patch)
tree38aa0c3d0905acf78b993c7957d24c59791ae4a0 /synapse/handlers/user_directory.py
parentDon't go round in circles (diff)
downloadsynapse-3e123b84977f84f4c60ebafadda9b381baa9d00f.tar.xz
Start later
Diffstat (limited to 'synapse/handlers/user_directory.py')
-rw-r--r--synapse/handlers/user_directory.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py
index 4b1b7df745..87c467f096 100644
--- a/synapse/handlers/user_directory.py
+++ b/synapse/handlers/user_directory.py
@@ -90,6 +90,9 @@ class UserDirectoyHandler(object):
 
     @defer.inlineCallbacks
     def _do_initial_spam(self):
+        # TODO: pull from current delta stream_id
+        new_pos = self.store.get_room_max_stream_ordering()
+
         yield self.store.delete_all_from_user_dir()
 
         room_ids = yield self.store.get_all_rooms()
@@ -99,7 +102,7 @@ class UserDirectoyHandler(object):
 
         self.initially_handled_users = None
 
-        yield self.store.update_user_directory_stream_pos(-1)
+        yield self.store.update_user_directory_stream_pos(new_pos)
 
     @defer.inlineCallbacks
     def _handle_new_user(self, room_id, user_id, profile):