24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-18 22:15:20 +02:00

Include status 110 in presence to new occupant (EJAB-740)

This commit is contained in:
Badlop 2011-07-16 19:26:20 +02:00
parent 1a4722e909
commit 83014fb77b

View File

@ -1945,10 +1945,17 @@ send_new_presence(NJID, Reason, StateData) ->
false ->
Status
end,
Status3 = case NJID == Info#user.jid of
true ->
[{xmlelement, "status", [{"code", "110"}], []}
| Status2];
false ->
Status2
end,
Packet = xml:append_subtags(
Presence,
[{xmlelement, "x", [{"xmlns", ?NS_MUC_USER}],
[{xmlelement, "item", ItemAttrs, ItemEls} | Status2]}]),
[{xmlelement, "item", ItemAttrs, ItemEls} | Status3]}]),
ejabberd_router:route(
jlib:jid_replace_resource(StateData#state.jid, Nick),
Info#user.jid,