# HG changeset patch # User Kim Alvefur # Date 1534426546 -7200 # Node ID b88f537163dae4230d9fcebb3966fc78b2ef1a22 # Parent 8fadd3d6c8d3ff10090dd33a5f1f6d9382d3bca9 mod_pep: Respect setting for whether to include payload in notifications diff -r 8fadd3d6c8d3 -r b88f537163da plugins/mod_pep.lua --- a/plugins/mod_pep.lua Thu Aug 16 15:34:58 2018 +0200 +++ b/plugins/mod_pep.lua Thu Aug 16 15:35:46 2018 +0200 @@ -138,6 +138,11 @@ if item then 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 + end message:add_child(item); end for jid in pairs(jids) do