Software /
code /
prosody
Changeset
12212:bc6fc1cb04ae
mod_pubsub: Use the 'pubsub#type' setting to pick summary generator
Allows using different ones even if multiple semantically different
formats share the same root element xmlns, e.g. generic Atom and
XEP-0277 entries.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 24 Jan 2022 23:05:26 +0100 |
parents | 12211:5c2ae28f536e |
children | 12213:dc9d63166488 |
files | plugins/mod_pubsub/mod_pubsub.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Tue Jan 25 13:20:26 2022 +0100 +++ b/plugins/mod_pubsub/mod_pubsub.lua Mon Jan 24 23:05:26 2022 +0100 @@ -102,7 +102,8 @@ local summary; if item and item.tags[1] then local payload = item.tags[1]; - summary = module:fire_event("pubsub-summary/"..payload.attr.xmlns, { + local payload_type = node_obj and node_obj.config.payload_type or payload.attr.xmlns; + summary = module:fire_event("pubsub-summary/"..payload_type, { kind = kind, node = node, jids = jids, actor = actor, item = item, payload = payload, }); end