mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
When user joins logged room, he must be warned (EJAB-726)
This commit is contained in:
parent
086fbc6a50
commit
e412438aba
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user