summary refs log tree commit diff
path: root/synapse/storage/user_directory.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-03-12 18:06:28 +1100
committerAmber Brown <hawkowl@atleastfornow.net>2019-03-12 18:06:28 +1100
commit8b618041efc230c87c74b912640b8e5727fcc539 (patch)
tree7c86c97fe3c26f83e3927d5e187660c91ca93afb /synapse/storage/user_directory.py
parentuse the old method (diff)
downloadsynapse-8b618041efc230c87c74b912640b8e5727fcc539.tar.xz
fixup
Diffstat (limited to 'synapse/storage/user_directory.py')
-rw-r--r--synapse/storage/user_directory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index 72a9071d03..4de552c1bb 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -648,7 +648,7 @@ class UserDirectoryStore(BackgroundUpdateStore):
                 ) AS s USING (user_id)
             """
             join_args = (user_id,)
-            where_clause = "p.user_id IS NOT NULL"
+            where_clause = "(s.user_id IS NOT NULL OR p.user_id IS NOT NULL)"
 
         if isinstance(self.database_engine, PostgresEngine):
             full_query, exact_query, prefix_query = _parse_query_postgres(search_term)