aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-07-06 10:33:16 +0200
committerKim Alvefur <zash@zash.se>2017-07-06 10:33:16 +0200
commit8a606428256ba0bbedf06e7b1798fafecc75c052 (patch)
treebf9065b4927a0765c9a8ec44dbd21c258dcd108f /plugins/muc
parentf1e0f5c8dd0fe96c8804161e16371305c9460d22 (diff)
downloadprosody-8a606428256ba0bbedf06e7b1798fafecc75c052.tar.gz
prosody-8a606428256ba0bbedf06e7b1798fafecc75c052.zip
MUC: Include status code 110 on role change notifications (fixes #765))
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua9
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