From 19f9d45e8ca19778137a0a571ed127cdd26c1fac Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 6 Jul 2017 10:33:16 +0200 Subject: MUC: Include status code 110 on role change notifications (fixes #765)) --- plugins/muc/muc.lib.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins') 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 -- cgit v1.2.3