summary refs log tree commit diff
path: root/synapse/handlers/message.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/message.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/message.py')
-rw-r--r--synapse/handlers/message.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index be6ae18a92..d6be280952 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -99,7 +99,9 @@ class MessageHandler(object):
         (
             membership,
             membership_event_id,
-        ) = yield self.auth.check_in_room_or_world_readable(room_id, user_id)
+        ) = yield self.auth.check_user_in_room_or_world_readable(
+            room_id, user_id, allow_departed_users=True
+        )
 
         if membership == Membership.JOIN:
             data = yield self.state.get_current_state(room_id, event_type, state_key)
@@ -177,7 +179,9 @@ class MessageHandler(object):
             (
                 membership,
                 membership_event_id,
-            ) = yield self.auth.check_in_room_or_world_readable(room_id, user_id)
+            ) = yield self.auth.check_user_in_room_or_world_readable(
+                room_id, user_id, allow_departed_users=True
+            )
 
             if membership == Membership.JOIN:
                 state_ids = yield self.store.get_filtered_current_state_ids(
@@ -216,8 +220,8 @@ class MessageHandler(object):
         if not requester.app_service:
             # We check AS auth after fetching the room membership, as it
             # requires us to pull out all joined members anyway.
-            membership, _ = yield self.auth.check_in_room_or_world_readable(
-                room_id, user_id
+            membership, _ = yield self.auth.check_user_in_room_or_world_readable(
+                room_id, user_id, allow_departed_users=True
             )
             if membership != Membership.JOIN:
                 raise NotImplementedError(