When user joins logged room, he must be warned (EJAB-726)

This commit is contained in:
Badlop 2015-12-02 12:07:29 +01:00
parent 086fbc6a50
commit e412438aba
1 changed files with 10 additions and 1 deletions

View File

@ -2193,6 +2193,15 @@ send_new_presence1(NJID, Reason, StateData) ->
| Status2];
false -> Status2
end,
Status4 = case (StateData#state.config)#config.logging of
true ->
[#xmlel{name = <<"status">>,
attrs =
[{<<"code">>, <<"170">>}],
children = []}
| Status3];
false -> Status3
end,
Packet = xml:append_subtags(Presence,
[#xmlel{name = <<"x">>,
attrs =
@ -2207,7 +2216,7 @@ send_new_presence1(NJID, Reason, StateData) ->
children
=
ItemEls}
| Status3]}]),
| Status4]}]),
ejabberd_router:route(jid:replace_resource(StateData#state.jid,
Nick),
Info#user.jid, Packet)