# HG changeset patch # User Kim Alvefur # Date 1499329996 -7200 # Node ID 2608865545129dfcc4462eb785d760acf2eb6581 # Parent 3ff99d49082f7255033bacebb02e5090426f9d75 MUC: Include status code 110 on role change notifications (fixes #765)) diff -r 3ff99d49082f -r 260886554512 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Wed Jul 05 05:44:56 2017 +0200 +++ b/plugins/muc/muc.lib.lua Thu Jul 06 10:33:16 2017 +0200 @@ -1083,17 +1083,20 @@ 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); + if occupant.jid == jid then + bp = st.clone(p); + bp:add_child(x); + end + p:add_child(self_x); self:_route_stanza(p); - if occupant.jid == jid then - bp = p; - end end if callback then callback(); end if bp then