Software /
code /
prosody
Changeset
9190:b88f537163da
mod_pep: Respect setting for whether to include payload in notifications
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Aug 2018 15:35:46 +0200 |
parents | 9189:8fadd3d6c8d3 |
children | 9191:5192adc5c47f |
files | plugins/mod_pep.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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