25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

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

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,