diff options
author | Kim Alvefur <zash@zash.se> | 2017-07-06 10:33:16 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-07-06 10:33:16 +0200 |
commit | 8a606428256ba0bbedf06e7b1798fafecc75c052 (patch) | |
tree | bf9065b4927a0765c9a8ec44dbd21c258dcd108f | |
parent | f1e0f5c8dd0fe96c8804161e16371305c9460d22 (diff) | |
download | prosody-8a606428256ba0bbedf06e7b1798fafecc75c052.tar.gz prosody-8a606428256ba0bbedf06e7b1798fafecc75c052.zip |
MUC: Include status code 110 on role change notifications (fixes #765))
-rw-r--r-- | plugins/muc/muc.lib.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index df4c50bb..79daad92 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1083,17 +1083,20 @@ function room_mt:set_role(actor, occupant_jid, role, callback, reason) else occupant.role = role; end + local self_x = st.clone(x); + self_x:tag("status", {code = "110"}):up(); local bp; for jid,pres in pairs(occupant.sessions) do -- send to all sessions of the nick local p = st.clone(pres); p.attr.from = occupant_jid; p.attr.type = presence_type; p.attr.to = jid; - p:add_child(x); - self:_route_stanza(p); if occupant.jid == jid then - bp = p; + bp = st.clone(p); + bp:add_child(x); end + p:add_child(self_x); + self:_route_stanza(p); end if callback then callback(); end if bp then |