aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-16 15:35:46 +0200
committerKim Alvefur <zash@zash.se>2018-08-16 15:35:46 +0200
commita8ade3cfc2b18a4132d83e1c35a8d9afff3edc35 (patch)
tree97454a344a79734b2e3a8cdbfc1e658704e8b69b
parent93c1672af7f16f4a8fd87609e5ce43cb4d841a2d (diff)
downloadprosody-a8ade3cfc2b18a4132d83e1c35a8d9afff3edc35.tar.gz
prosody-a8ade3cfc2b18a4132d83e1c35a8d9afff3edc35.zip
mod_pep: Respect setting for whether to include payload in notifications
-rw-r--r--plugins/mod_pep.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index fb4e2f0d..7533d6f1 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -138,6 +138,11 @@ local function get_broadcaster(username)
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