mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
When user joins non-anonymous room, warn also in presence stanza (EJAB-310)
This commit is contained in:
parent
b14899d41a
commit
972440c2ca
@ -1887,10 +1887,18 @@ send_new_presence(NJID, Reason, StateData) ->
|
||||
false ->
|
||||
[]
|
||||
end,
|
||||
Status2 = case ((StateData#state.config)#config.anonymous==false)
|
||||
andalso (NJID == Info#user.jid) of
|
||||
true ->
|
||||
[{xmlelement, "status", [{"code", "100"}], []}
|
||||
| Status];
|
||||
false ->
|
||||
Status
|
||||
end,
|
||||
Packet = xml:append_subtags(
|
||||
Presence,
|
||||
[{xmlelement, "x", [{"xmlns", ?NS_MUC_USER}],
|
||||
[{xmlelement, "item", ItemAttrs, ItemEls} | Status]}]),
|
||||
[{xmlelement, "item", ItemAttrs, ItemEls} | Status2]}]),
|
||||
ejabberd_router:route(
|
||||
jlib:jid_replace_resource(StateData#state.jid, Nick),
|
||||
Info#user.jid,
|
||||
|
Loading…
Reference in New Issue
Block a user