diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-16 15:20:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-16 15:20:29 +0200 |
commit | b709391fef27f55e75f3267fe457a077257e8680 (patch) | |
tree | 301b63d70466205417044d733d3d916c7d817968 /plugins/mod_pubsub/mod_pubsub.lua | |
parent | 47e3102c61caf32e18eb8970b1594a6b3fdc99b8 (diff) | |
download | prosody-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.lua | 3 |
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 |