Comparison

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
parent 11717:605484fc1c62
child 11720:72512c0858b3
comparison
equal deleted inserted replaced
11717:605484fc1c62 11718:d79f5431f31b
72 item.attr.xmlns = nil; -- Clear the pubsub namespace 72 item.attr.xmlns = nil; -- Clear the pubsub namespace
73 if kind == "items" then 73 if kind == "items" then
74 if node_obj and node_obj.config.include_payload == false then 74 if node_obj and node_obj.config.include_payload == false then
75 item:maptags(function () return nil; end); 75 item:maptags(function () return nil; end);
76 end 76 end
77 if expose_publisher and actor then 77 if not expose_publisher then
78 item.attr.publisher = nil;
79 elseif not item.attr.publisher then
78 item.attr.publisher = service.config.normalize_jid(actor); 80 item.attr.publisher = service.config.normalize_jid(actor);
79 end 81 end
80 end 82 end
81 end 83 end
82 84