# HG changeset patch # User Kim Alvefur # Date 1499330400 -7200 # Node ID f07cfc9b9b36e301713a65f471ad76b8533f91db # Parent b187da5b7e8f89ce01ad5cf75d41ab3ee9df0d50 MUC: Add some comments attempting to explain what presence and tag goes where diff -r b187da5b7e8f -r f07cfc9b9b36 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Thu Jul 06 10:36:22 2017 +0200 +++ b/plugins/muc/muc.lib.lua Thu Jul 06 10:40:00 2017 +0200 @@ -1009,6 +1009,7 @@ 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 @@ p.attr.type = presence_type; p.attr.to = jid; if occupant.jid == jid then + -- Broadcast this presence to everyone else later, with the public variant local bp = st.clone(p); bp:add_child(x); modified_nicks[nick] = bp;