diff options
author | Kim Alvefur <zash@zash.se> | 2017-07-06 10:40:00 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-07-06 10:40:00 +0200 |
commit | 943e6be943dae4b05ac76d34176b5e6efd66115c (patch) | |
tree | e23ceca358672bd9e6f0539aec11b21116e52598 | |
parent | cb9b053d061266a0fbf2111ed631574845cb27e4 (diff) | |
download | prosody-943e6be943dae4b05ac76d34176b5e6efd66115c.tar.gz prosody-943e6be943dae4b05ac76d34176b5e6efd66115c.zip |
MUC: Add some comments attempting to explain what presence and <x> tag goes where
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 24582eae..8c486b87 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1009,6 +1009,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, callback, reason) x:tag("status", {code="321"}):up(); -- affiliation change end end + -- Your own presence should have status 110 local self_x = st.clone(x); self_x:tag("status", {code="110"}); local modified_nicks = {}; @@ -1026,6 +1027,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, callback, reason) p.attr.type = presence_type; p.attr.to = jid; if occupant.jid == jid then + -- Broadcast this presence to everyone else later, with the public <x> variant local bp = st.clone(p); bp:add_child(x); modified_nicks[nick] = bp; |