Remove existing role information for users that are kicked from room

This should fix issue reported in #4035
This commit is contained in:
Paweł Chmielowski 2023-05-24 12:15:20 +02:00
parent 4a53d4cb56
commit 3eecf4ae8a
1 changed files with 1 additions and 1 deletions

View File

@ -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,