aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
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
commit19f9d45e8ca19778137a0a571ed127cdd26c1fac (patch)
treebf9065b4927a0765c9a8ec44dbd21c258dcd108f /plugins/muc/muc.lib.lua
parent04d52fd099de46112313d47ded426e56938686ea (diff)
downloadprosody-19f9d45e8ca19778137a0a571ed127cdd26c1fac.tar.gz
prosody-19f9d45e8ca19778137a0a571ed127cdd26c1fac.zip
MUC: Include status code 110 on role change notifications (fixes #765))
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-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