Software /
code /
prosody
Changeset
11718:d79f5431f31b
mod_pubsub: Remove publisher field when not exposing publisher
The publisher is already there on the item when the broadcaster gets it,
so it needs to do the opposite thing.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 25 Jul 2021 14:23:35 +0200 |
parents | 11717:605484fc1c62 |
children | 11719:3986b5a0c3fc |
files | plugins/mod_pubsub/mod_pubsub.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Sun Jul 25 14:01:45 2021 +0200 +++ b/plugins/mod_pubsub/mod_pubsub.lua Sun Jul 25 14:23:35 2021 +0200 @@ -74,7 +74,9 @@ if node_obj and node_obj.config.include_payload == false then item:maptags(function () return nil; end); end - if expose_publisher and actor then + if not expose_publisher then + item.attr.publisher = nil; + elseif not item.attr.publisher then item.attr.publisher = service.config.normalize_jid(actor); end end