diff options
author | Badlop <badlop@process-one.net> | 2014-02-14 19:22:14 +0400 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2014-02-14 19:22:14 +0400 |
commit | 63a7011c38fb8ff967df68170da2abd8f2a9d37a (patch) | |
tree | 3dc3f3beaef2c9d7634de13be9975e9a6370d021 /src | |
parent | 4c8b6fe16b431f29498898e4e684ae2c23f12d79 (diff) |
When occupant changes nick, include status 110 in stanzas sent to him
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_muc_room.erl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index b1c5c92ff..1ef90b1eb 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -2334,6 +2334,14 @@ send_nick_changing(JID, OldNick, StateData, [{<<"affiliation">>, SAffiliation}, {<<"role">>, SRole}] end, + Status110 = case JID == Info#user.jid of + true -> + [#xmlel{name = <<"status">>, + attrs = [{<<"code">>, <<"110">>}] + }]; + false -> + [] + end, Packet1 = #xmlel{name = <<"presence">>, attrs = [{<<"type">>, @@ -2356,7 +2364,7 @@ send_nick_changing(JID, OldNick, StateData, [{<<"code">>, <<"303">>}], children = - []}]}]}, + []}|Status110]}]}, Packet2 = xml:append_subtags(Presence, [#xmlel{name = <<"x">>, attrs = @@ -2371,7 +2379,7 @@ send_nick_changing(JID, OldNick, StateData, ItemAttrs2, children = - []}]}]), + []}|Status110]}]), if SendOldUnavailable -> ejabberd_router:route(jlib:jid_replace_resource(StateData#state.jid, OldNick), |