mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-19 15:14:34 -04:00
Allow sending a membership event to unban a user (#10807)
* Allow membership event to unban user Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
f455b0e420
commit
6a751ff5e0
4 changed files with 99 additions and 2 deletions
|
@ -668,7 +668,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
|
|||
" (membership=%s)" % old_membership,
|
||||
errcode=Codes.BAD_STATE,
|
||||
)
|
||||
if old_membership == "ban" and action != "unban":
|
||||
if old_membership == "ban" and action not in ["ban", "unban", "leave"]:
|
||||
raise SynapseError(
|
||||
403,
|
||||
"Cannot %s user who was banned" % (action,),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue