summary refs log tree commit diff
path: root/synapse/handlers/directory.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-02-19 11:19:11 +0000
committerGitHub <noreply@github.com>2020-02-19 11:19:11 +0000
commit2fb7794e60783b09aaea8e598cd1fa37b1fc5de1 (patch)
tree40dabbe9c153d39a440d4b0c71728f23c25fb88f /synapse/handlers/directory.py
parentMerge pull request #6940 from matrix-org/babolivier/federate.md (diff)
parentchangelog (diff)
downloadsynapse-2fb7794e60783b09aaea8e598cd1fa37b1fc5de1.tar.xz
Merge pull request #6949 from matrix-org/rav/list_room_aliases_peekable
Make room alias lists peekable
Diffstat (limited to 'synapse/handlers/directory.py')
-rw-r--r--synapse/handlers/directory.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py
index 3f8c792149..db2104c5f6 100644
--- a/synapse/handlers/directory.py
+++ b/synapse/handlers/directory.py
@@ -463,7 +463,9 @@ class DirectoryHandler(BaseHandler):
         # allow access to server admins and current members of the room
         is_admin = await self.auth.is_server_admin(requester.user)
         if not is_admin:
-            await self.auth.check_joined_room(room_id, requester.user.to_string())
+            await self.auth.check_user_in_room_or_world_readable(
+                room_id, requester.user.to_string()
+            )
 
         aliases = await self.store.get_aliases_for_room(room_id)
         return aliases