fix pep8 and tests

This commit is contained in:
Matthew Hodgson 2017-12-04 15:11:38 +00:00
parent 1bd40ca73e
commit 74e0cc74ce
3 changed files with 6 additions and 8 deletions

View File

@ -194,7 +194,7 @@ class ProfileHandler(BaseHandler):
if self.hs.config.user_directory_search_all_users: if self.hs.config.user_directory_search_all_users:
profile = yield self.store.get_profileinfo(target_user.localpart) profile = yield self.store.get_profileinfo(target_user.localpart)
yield self.user_directory_handler.handle_local_profile_change( 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) yield self._update_join_states(requester, target_user)

View File

@ -423,7 +423,6 @@ class UserDirectoryHandler(object):
if not row: if not row:
yield self.store.add_profiles_to_user_dir(None, {user_id: profile}) yield self.store.add_profiles_to_user_dir(None, {user_id: profile})
@defer.inlineCallbacks @defer.inlineCallbacks
def _handle_new_user(self, room_id, user_id, profile): def _handle_new_user(self, room_id, user_id, profile):
"""Called when we might need to add user to directory """Called when we might need to add user to directory

View File

@ -640,7 +640,6 @@ class UserDirectoryStore(SQLBaseStore):
} }
""" """
if self.hs.config.user_directory_search_all_users: if self.hs.config.user_directory_search_all_users:
join_clause = "" join_clause = ""
where_clause = "?<>''" # naughty hack to keep the same number of binds where_clause = "?<>''" # naughty hack to keep the same number of binds