aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-16 15:18:29 +0200
committerKim Alvefur <zash@zash.se>2018-08-16 15:18:29 +0200
commit47e3102c61caf32e18eb8970b1594a6b3fdc99b8 (patch)
tree366ca32f490a48f6e4048864130b8baca2b16e39 /plugins/mod_pubsub
parent879cda7ae01c1820b99b3130bb1482898bb22d08 (diff)
downloadprosody-47e3102c61caf32e18eb8970b1594a6b3fdc99b8.tar.gz
prosody-47e3102c61caf32e18eb8970b1594a6b3fdc99b8.zip
mod_pubsub: Only attach publisher on normal "item" broadcasts
The 'publisher' is only on <item> in the schema.
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index b32aff5d..01bf3aea 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -59,8 +59,10 @@ function simple_broadcast(kind, node, jids, item, actor, node_obj)
if item then
item = st.clone(item);
item.attr.xmlns = nil; -- Clear the pubsub namespace
- if expose_publisher and actor then
- item.attr.publisher = actor
+ if kind == "items" then
+ if expose_publisher and actor then
+ item.attr.publisher = actor
+ end
end
end