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
commit533cefaaf10bed012cbfb1f92cc9a7a5235bfec0 (patch)
tree301b63d70466205417044d733d3d916c7d817968 /plugins/mod_pubsub/mod_pubsub.lua
parent8d3bfff0c2c158ec5d0e22a1d1be08acb58e49e2 (diff)
downloadprosody-533cefaaf10bed012cbfb1f92cc9a7a5235bfec0.tar.gz
prosody-533cefaaf10bed012cbfb1f92cc9a7a5235bfec0.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