aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_pep.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index cb775fb5..40385616 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -136,9 +136,6 @@ local function get_broadcaster(username)
if kind == "retract" then
kind = "items"; -- XEP-0060 signals retraction in an <items> container
end
- local message = st.message({ from = user_bare, type = "headline" })
- :tag("event", { xmlns = xmlns_pubsub_event })
- :tag(kind, { node = node });
if item then
item = st.clone(item);
item.attr.xmlns = nil; -- Clear the pubsub namespace
@@ -147,6 +144,12 @@ local function get_broadcaster(username)
item:maptags(function () return nil; end);
end
end
+ end
+
+ 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