diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index b26e02f76..f6c5c4bb3 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -1832,7 +1832,7 @@ set_role(JID, Role, StateData) -> %% maintain the same role they had *before* they were kicked, %% unless they were banned none when Affiliation /= outcast -> - StateData#state.roles; + maps:remove(jid:remove_resource(LJID), StateData#state.roles); NewRole -> maps:put(jid:remove_resource(LJID), NewRole,