diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-25 14:23:35 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-25 14:23:35 +0200 |
commit | c5cb4577939d829518c4ad945d53627a7dea3ad5 (patch) | |
tree | 0a07a62d169822d82597877ee5342db6e25add3b | |
parent | 4dc5192c99ce2739952ab77b386f76b987f52dc2 (diff) | |
download | prosody-c5cb4577939d829518c4ad945d53627a7dea3ad5.tar.gz prosody-c5cb4577939d829518c4ad945d53627a7dea3ad5.zip |
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.
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index dfe60f73..d823657a 100644 --- a/plugins/mod_pubsub/mod_pubsub.lua +++ b/plugins/mod_pubsub/mod_pubsub.lua @@ -74,7 +74,9 @@ function simple_broadcast(kind, node, jids, item, actor, node_obj, service) 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 |