Software /
code /
prosody
Changeset
8174:260886554512
MUC: Include status code 110 on role change notifications (fixes #765))
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 06 Jul 2017 10:33:16 +0200 |
parents | 8173:3ff99d49082f |
children | 8175:b187da5b7e8f |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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