24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-08 21:43:07 +02:00

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

View File

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