From 3eecf4ae8a5cfc68164dde905ed073482167dd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Wed, 24 May 2023 12:15:20 +0200 Subject: [PATCH] Remove existing role information for users that are kicked from room This should fix issue reported in #4035 --- src/mod_muc_room.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,