summary refs log tree commit diff
path: root/synapse/storage/user_directory.py
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/storage/user_directory.py
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/storage/user_directory.py')
-rw-r--r--synapse/storage/user_directory.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index f9d2f8e60d..c9bff408ef 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -640,10 +640,9 @@ class UserDirectoryStore(SQLBaseStore):
                 }
         """
 
-
         if self.hs.config.user_directory_search_all_users:
             join_clause = ""
-            where_clause = "?<>''" # naughty hack to keep the same number of binds
+            where_clause = "?<>''"  # naughty hack to keep the same number of binds
         else:
             join_clause = """
                 LEFT JOIN users_in_public_rooms AS p USING (user_id)
@@ -692,7 +691,7 @@ class UserDirectoryStore(SQLBaseStore):
                     display_name IS NULL,
                     avatar_url IS NULL
                 LIMIT ?
-            """ % ( join_clause, where_clause )
+            """ % (join_clause, where_clause)
             args = (user_id, full_query, exact_query, prefix_query, limit + 1,)
         elif isinstance(self.database_engine, Sqlite3Engine):
             search_query = _parse_query_sqlite(search_term)
@@ -710,7 +709,7 @@ class UserDirectoryStore(SQLBaseStore):
                     display_name IS NULL,
                     avatar_url IS NULL
                 LIMIT ?
-            """ % ( join_clause, where_clause )
+            """ % (join_clause, where_clause)
             args = (user_id, search_query, limit + 1)
         else:
             # This should be unreachable.