24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-14 22:00:16 +02:00

More strict checking for MUC initial presence

This commit is contained in:
Paweł Chmielowski 2016-02-01 12:09:34 +01:00
parent dc52ec904c
commit fa55ac5c8f

View File

@ -2220,11 +2220,16 @@ send_new_presence1(NJID, Reason, StateData, OldStateData) ->
Status4 = case (StateData#state.config)#config.logging == true Status4 = case (StateData#state.config)#config.logging == true
andalso NJID == Info#user.jid of andalso NJID == Info#user.jid of
true -> true ->
case (?DICT):find(jid:tolower(LJID),
OldStateData#state.users) of
{ok, _} -> Status3;
_ ->
[#xmlel{name = <<"status">>, [#xmlel{name = <<"status">>,
attrs = attrs =
[{<<"code">>, <<"170">>}], [{<<"code">>, <<"170">>}],
children = []} children = []}
| Status3]; | Status3]
end;
false -> Status3 false -> Status3
end, end,
Packet = xml:append_subtags(Presence, Packet = xml:append_subtags(Presence,