summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2017-02-15 19:32:20 +0000
committerDavid Baker <dave@matrix.org>2017-02-15 19:32:20 +0000
commit474c9aadbe542440bb7cd764a654518b5c36f851 (patch)
treed8d455ce099997791a7549d00d886fd0f4ab91fd
parentMerge pull request #1917 from matrix-org/dbkr/make_ban_reasons_work (diff)
downloadsynapse-474c9aadbe542440bb7cd764a654518b5c36f851.tar.xz
Allow forgetting rooms you're banned from
-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
             ))