From 0c2d252631e19877e2aa367e2044908510065d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Oct=C3=A1vio=20Tarrafil?= Date: Thu, 27 Aug 2020 17:42:46 -0300 Subject: [PATCH] Admin de-member himself --- src/mod_muc_room.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index efc2bfc1692..47055bb85f7 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -3131,6 +3131,9 @@ can_change_ra(owner, _FRole, admin, _TRole, affiliation, can_change_ra(owner, _FRole, owner, _TRole, affiliation, _Affiliation, _ServiceAf) -> check_owner; +can_change_ra(admin, _FRole, admin, + _TRole, affiliation, none, none) -> + true; % Allow a admin that joined the room to de-member himself can_change_ra(member, participant, member, participant, affiliation, none, none) -> true; % Allow a member that joined the room to de-member himself