aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mod_muc_room.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl
index 808b8a246..2fc4e6e93 100644
--- a/src/mod_muc_room.erl
+++ b/src/mod_muc_room.erl
@@ -2916,9 +2916,13 @@ process_item_change(Item, SD, UJID) ->
set_role(JID, none, SD1);
_ ->
SD1 = set_affiliation(JID, none, SD),
- send_update_presence(JID, Reason, SD1, SD),
- maybe_send_affiliation(JID, none, SD1),
- SD1
+ SD2 = case (SD1#state.config)#config.moderated of
+ true -> set_role(JID, visitor, SD1);
+ false -> set_role(JID, participant, SD1)
+ end,
+ send_update_presence(JID, Reason, SD2, SD),
+ maybe_send_affiliation(JID, none, SD2),
+ SD2
end;
{JID, affiliation, outcast, Reason} ->
send_kickban_presence(UJID, JID, Reason, 301, outcast, SD),