# HG changeset patch # User Kim Alvefur # Date 1545530079 -3600 # Node ID 695fae2e16b26cb2075f6e100103ff3e44d40365 # Parent 233305015373179713db92dfb9cbf258a198aee5 mod_pep: Add some spacing between blocks in broadcaster to improve readability diff -r 233305015373 -r 695fae2e16b2 plugins/mod_pep.lua --- a/plugins/mod_pep.lua Sun Dec 23 02:53:12 2018 +0100 +++ b/plugins/mod_pep.lua Sun Dec 23 02:54:39 2018 +0100 @@ -136,6 +136,7 @@ if kind == "retract" then kind = "items"; -- XEP-0060 signals retraction in an container end + if item then item = st.clone(item); item.attr.xmlns = nil; -- Clear the pubsub namespace @@ -149,9 +150,11 @@ local message = st.message({ from = user_bare, type = "headline" }) :tag("event", { xmlns = xmlns_pubsub_event }) :tag(kind, { node = node }); + if item then message:add_child(item); end + for jid in pairs(jids) do module:log("debug", "Sending notification to %s from %s: %s", jid, user_bare, tostring(item)); message.attr.to = jid;