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.
--- 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