mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-08 21:43:07 +02:00
Include status 110 in presence to new occupant (EJAB-740)
This commit is contained in:
parent
d923c70082
commit
98a78624cc
|
@ -1981,11 +1981,19 @@ send_new_presence(NJID, Reason, StateData) ->
|
|||
false ->
|
||||
Status
|
||||
end,
|
||||
Status3 = case NJID == Info#user.jid of
|
||||
true ->
|
||||
[#xmlel{name = 'status',
|
||||
attrs = [?XMLATTR(<<"code">>, <<"110">>)]}
|
||||
| Status2];
|
||||
false ->
|
||||
Status2
|
||||
end,
|
||||
Packet = exmpp_xml:append_child(Presence,
|
||||
#xmlel{ns = ?NS_MUC_USER, name = 'x',
|
||||
children = [#xmlel{ns = ?NS_MUC_USER, name ='item',
|
||||
attrs = ItemAttrs,
|
||||
children = ItemEls} | Status2]}),
|
||||
children = ItemEls} | Status3]}),
|
||||
ejabberd_router:route(
|
||||
jid_replace_resource(StateData#state.jid, Nick),
|
||||
Info#user.jid,
|
||||
|
|
Loading…
Reference in New Issue
Block a user