Mercurial > prosody-hg
diff plugins/mod_pubsub/mod_pubsub.lua @ 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 | 605484fc1c62 |
| children | 72512c0858b3 |
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
