diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index 4f6c68810..3306e48a4 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -2220,12 +2220,17 @@ send_new_presence1(NJID, Reason, StateData, OldStateData) -> Status4 = case (StateData#state.config)#config.logging == true andalso NJID == Info#user.jid of true -> - [#xmlel{name = <<"status">>, - attrs = - [{<<"code">>, <<"170">>}], - children = []} - | Status3]; - false -> Status3 + case (?DICT):find(jid:tolower(LJID), + OldStateData#state.users) of + {ok, _} -> Status3; + _ -> + [#xmlel{name = <<"status">>, + attrs = + [{<<"code">>, <<"170">>}], + children = []} + | Status3] + end; + false -> Status3 end, Packet = xml:append_subtags(Presence, [#xmlel{name = <<"x">>,