aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mod_muc_room.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl
index 41e776339..d883788dd 100644
--- a/src/mod_muc_room.erl
+++ b/src/mod_muc_room.erl
@@ -1243,7 +1243,12 @@ expulse_participant(Packet, From, StateData, Reason1) ->
#presence{type = unavailable,
status = xmpp:mk_text(Reason2)},
StateData),
- send_new_presence(From, NewState, StateData),
+ LJID = jid:tolower(From),
+ {ok, #user{nick = Nick}} = (?DICT):find(LJID, StateData#state.users),
+ case (?DICT):find(Nick, StateData#state.nicks) of
+ {ok, [_, _ | _]} -> ok;
+ _ -> send_new_presence(From, NewState, StateData)
+ end,
remove_online_user(From, NewState).
-spec set_affiliation(jid(), affiliation(), state()) -> state().