# HG changeset patch # User Kim Alvefur # Date 1627215815 -7200 # Node ID d79f5431f31b8c6735378e11acc91536a75a8911 # Parent 605484fc1c62849d0c0492d14014265a6764fb12 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. diff -r 605484fc1c62 -r d79f5431f31b plugins/mod_pubsub/mod_pubsub.lua --- 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