aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-12-23 02:54:39 +0100
committerKim Alvefur <zash@zash.se>2018-12-23 02:54:39 +0100
commit36d31b94bf54bac423fdeac12c4978d22ca1b6f8 (patch)
tree9f5d27e45f88cfa2da38798fafd35c68e2fb21b6 /plugins/mod_pep.lua
parent4cbf600434638bcb53c8defb767a076135ab8f24 (diff)
downloadprosody-36d31b94bf54bac423fdeac12c4978d22ca1b6f8.tar.gz
prosody-36d31b94bf54bac423fdeac12c4978d22ca1b6f8.zip
mod_pep: Add some spacing between blocks in broadcaster to improve readability
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 40385616..6275d47c 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -136,6 +136,7 @@ local function get_broadcaster(username)
if kind == "retract" then
kind = "items"; -- XEP-0060 signals retraction in an <items> container
end
+
if item then
item = st.clone(item);
item.attr.xmlns = nil; -- Clear the pubsub namespace
@@ -149,9 +150,11 @@ local function get_broadcaster(username)
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;