diff options
author | Badlop <badlop@process-one.net> | 2011-07-16 19:31:30 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2011-07-16 19:31:44 +0200 |
commit | 98a78624cca490f9f41a9e784f88662cffd6589d (patch) | |
tree | a9a51fc2da05c6a0419da42219b784c1ce739734 | |
parent | Document static_modules, prefix, and which modules don't support static (diff) |
Include status 110 in presence to new occupant (EJAB-740)
-rw-r--r-- | src/mod_muc/mod_muc_room.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 1b3495e6f..c932e6fb7 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -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, |