summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-03-12 17:51:14 +1100
committerAmber Brown <hawkowl@atleastfornow.net>2019-03-12 17:51:14 +1100
commitc980c7e31facdb33504051942857a0f67410f39a (patch)
tree0a650d3b49398895f33e538b734d7f889e8c5a58 /synapse
parentfix (diff)
downloadsynapse-c980c7e31facdb33504051942857a0f67410f39a.tar.xz
use the old method
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/user_directory.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index 745e6f26ec..72a9071d03 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -641,12 +641,11 @@ class UserDirectoryStore(BackgroundUpdateStore):
             where_clause = "1=1"
         else:
             join_clause = """
+                LEFT JOIN users_in_public_rooms AS p USING (user_id)
                 LEFT JOIN (
-                    SELECT user_id FROM users_in_public_rooms
-                    UNION
                     SELECT other_user_id AS user_id FROM users_who_share_private_rooms
                     WHERE user_id = ?
-                ) AS p USING (user_id)
+                ) AS s USING (user_id)
             """
             join_args = (user_id,)
             where_clause = "p.user_id IS NOT NULL"