aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/mod_pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-16 15:20:29 +0200
committerKim Alvefur <zash@zash.se>2018-08-16 15:20:29 +0200
commitb709391fef27f55e75f3267fe457a077257e8680 (patch)
tree301b63d70466205417044d733d3d916c7d817968 /plugins/mod_pubsub/mod_pubsub.lua
parent47e3102c61caf32e18eb8970b1594a6b3fdc99b8 (diff)
downloadprosody-b709391fef27f55e75f3267fe457a077257e8680.tar.gz
prosody-b709391fef27f55e75f3267fe457a077257e8680.zip
mod_pubsub: Add support for thin notifications (without the full payload)
Diffstat (limited to 'plugins/mod_pubsub/mod_pubsub.lua')
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index 01bf3aea..4e9cecb4 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -60,6 +60,9 @@ function simple_broadcast(kind, node, jids, item, actor, node_obj)
item = st.clone(item);
item.attr.xmlns = nil; -- Clear the pubsub namespace
if kind == "items" then
+ if node_obj and node_obj.config.include_payload == false then
+ item:maptags(function () return nil; end);
+ end
if expose_publisher and actor then
item.attr.publisher = actor
end