summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2017-12-04 15:11:38 +0000
committerMatthew Hodgson <matthew@matrix.org>2017-12-04 15:11:38 +0000
commit74e0cc74ceb48a8c55615180f67406b339c88a18 (patch)
tree302c02463b0c8be4d75f7230e35c08cc799c5b66 /synapse/handlers
parentswitch to a simpler 'search_all_users' button as per review feedback (diff)
downloadsynapse-74e0cc74ceb48a8c55615180f67406b339c88a18.tar.xz
fix pep8 and tests
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/profile.py2
-rw-r--r--synapse/handlers/user_directory.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index 50e81a20e4..9800e24453 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -194,7 +194,7 @@ class ProfileHandler(BaseHandler):
         if self.hs.config.user_directory_search_all_users:
             profile = yield self.store.get_profileinfo(target_user.localpart)
             yield self.user_directory_handler.handle_local_profile_change(
-                target_user.user_id, profile
+                target_user.to_string(), profile
             )
 
         yield self._update_join_states(requester, target_user)
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py
index c1f8e20bfd..667e98a218 100644
--- a/synapse/handlers/user_directory.py
+++ b/synapse/handlers/user_directory.py
@@ -162,7 +162,7 @@ class UserDirectoryHandler(object):
         num_processed_rooms = 0
 
         for room_id in room_ids:
-            logger.info("Handling room %d/%d", num_processed_rooms+1, len(room_ids))
+            logger.info("Handling room %d/%d", num_processed_rooms + 1, len(room_ids))
             yield self._handle_initial_room(room_id)
             num_processed_rooms += 1
             yield sleep(self.INITIAL_SLEEP_MS / 1000.)
@@ -176,7 +176,7 @@ class UserDirectoryHandler(object):
             for user_id in user_ids:
                 # We add profiles for all users even if they don't match the
                 # include pattern, just in case we want to change it in future
-                logger.info("Handling user %d/%d", num_processed_users+1, len(user_ids))
+                logger.info("Handling user %d/%d", num_processed_users + 1, len(user_ids))
                 yield self._handle_local_user(user_id)
                 num_processed_users += 1
                 yield sleep(self.INITIAL_SLEEP_MS / 1000.)
@@ -423,7 +423,6 @@ class UserDirectoryHandler(object):
         if not row:
             yield self.store.add_profiles_to_user_dir(None, {user_id: profile})
 
-
     @defer.inlineCallbacks
     def _handle_new_user(self, room_id, user_id, profile):
         """Called when we might need to add user to directory