aboutsummaryrefslogtreecommitdiffstats
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
commitaef3d7a500f54e8d44303b082ade3f5a14883efd (patch)
tree9f5d27e45f88cfa2da38798fafd35c68e2fb21b6
parent41426ee8d8bb478eb08840412359e4f1e1464832 (diff)
downloadprosody-aef3d7a500f54e8d44303b082ade3f5a14883efd.tar.gz
prosody-aef3d7a500f54e8d44303b082ade3f5a14883efd.zip
mod_pep: Add some spacing between blocks in broadcaster to improve readability
-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;