Software /
code /
prosody
Diff
plugins/mod_pep.lua @ 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 |
parent | 9189:8fadd3d6c8d3 |
child | 9196:2fc56434c6e3 |
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