Diff

plugins/mod_pubsub/mod_pubsub.lua @ 9188:ef2616ade453

mod_pubsub: Add support for thin notifications (without the full payload)
author Kim Alvefur <zash@zash.se>
date Thu, 16 Aug 2018 15:20:29 +0200
parent 9187:bd452e4f5a13
child 9234:d00e8ec7ece2
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua	Thu Aug 16 15:18:29 2018 +0200
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Thu Aug 16 15:20:29 2018 +0200
@@ -60,6 +60,9 @@
 		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