Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1922 from matrix-org/dbkr/allow_forget_for_ban
Browse files Browse the repository at this point in the history
Allow forgetting rooms you're banned from
  • Loading branch information
dbkr authored Feb 17, 2017
2 parents b6557f2 + 474c9aa commit 8c87bb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse/handlers/room_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,9 @@ def forget(self, user, room_id):
)
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
))
Expand Down

0 comments on commit 8c87bb5

Please sign in to comment.