diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index f66e320365a..fde032b94db 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -1822,7 +1822,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,