25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01: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,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">>,