aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-07-06 10:40:00 +0200
committerKim Alvefur <zash@zash.se>2017-07-06 10:40:00 +0200
commitae4828d86147bfe18e0e70416ac6c5c0130e5285 (patch)
treee23ceca358672bd9e6f0539aec11b21116e52598 /plugins
parentc0ac4526f686ce1faf21891a6d1bcb242aba0b90 (diff)
downloadprosody-ae4828d86147bfe18e0e70416ac6c5c0130e5285.tar.gz
prosody-ae4828d86147bfe18e0e70416ac6c5c0130e5285.zip
MUC: Add some comments attempting to explain what presence and <x> tag goes where
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua2
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;