summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorandrew do <andrewddo@gmail.com>2022-08-03 05:26:31 -0700
committerGitHub <noreply@github.com>2022-08-03 14:26:31 +0200
commit78a3111c41bf93fd52774965af50d62b74d937de (patch)
treedfbf7dfc38a6252a5e66f8d417f4e27765be5009 /synapse
parentInstall cryptography build dependencies in requirements image. (#13372) (diff)
downloadsynapse-78a3111c41bf93fd52774965af50d62b74d937de.tar.xz
Return 404 or member list when getting joined_members after leaving (#13374)
Signed-off-by: Andrew Doh <andrewddo@gmail.com>
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: Andrew Morgan <andrewm@element.io>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/message.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index e85b540451..ee0773988e 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -324,8 +324,10 @@ class MessageHandler:
                 room_id, user_id, allow_departed_users=True
             )
             if membership != Membership.JOIN:
-                raise NotImplementedError(
-                    "Getting joined members after leaving is not implemented"
+                raise SynapseError(
+                    code=403,
+                    errcode=Codes.FORBIDDEN,
+                    msg="Getting joined members while not being a current member of the room is forbidden.",
                 )
 
         users_with_profile = await self.store.get_users_in_room_with_profiles(room_id)