diff options
author | Badlop <badlop@process-one.net> | 2011-07-16 19:26:20 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2011-07-16 19:35:59 +0200 |
commit | 83014fb77b0131400768eb7b7ca401de48ee89b5 (patch) | |
tree | 1107090f2250f344ec58fbba36d79e05ff9ec9a0 | |
parent | Fix typo in modules overview (diff) |
Include status 110 in presence to new occupant (EJAB-740)
-rw-r--r-- | src/mod_muc/mod_muc_room.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index db2b5a8b3..3d1268820 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -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, |