summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2017-02-17 10:52:30 +0000
committerGitHub <noreply@github.com>2017-02-17 10:52:30 +0000
commit8c87bb550ecf1fc2a75d4e38d09c070825e58d38 (patch)
treedb0c323fc91d1cc6cd9cac5c13cedca15e31e4b8 /synapse
parentMerge pull request #1923 from matrix-org/erikj/push_action_compress (diff)
parentAllow forgetting rooms you're banned from (diff)
downloadsynapse-8c87bb550ecf1fc2a75d4e38d09c070825e58d38.tar.xz
Merge pull request #1922 from matrix-org/dbkr/allow_forget_for_ban
Allow forgetting rooms you're banned from
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index b2806555cf..2052d6d05f 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -719,7 +719,9 @@ class RoomMemberHandler(BaseHandler):
         )
         membership = member.membership if member else None
 
-        if membership is not None and membership != Membership.LEAVE:
+        if membership is not None and membership not in [
+            Membership.LEAVE, Membership.BAN
+        ]:
             raise SynapseError(400, "User %s in room %s" % (
                 user_id, room_id
             ))