aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-07-29 13:09:57 +0200
committerKim Alvefur <zash@zash.se>2017-07-29 13:09:57 +0200
commit6d90645c0a96a41250bd1c32af3af740b7ecf7b5 (patch)
tree41a7408dd330299853765586305e373e3c967d19 /util
parent1120e125ba4aa4d2ab77d512c594e9c437ce6115 (diff)
downloadprosody-6d90645c0a96a41250bd1c32af3af740b7ecf7b5.tar.gz
prosody-6d90645c0a96a41250bd1c32af3af740b7ecf7b5.zip
util.pubsub: Don't record publisher when superuser privileges are used (eg by modules)
Diffstat (limited to 'util')
-rw-r--r--util/pubsub.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index 159b16f3..014aaa86 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -268,7 +268,9 @@ function service:publish(node, actor, id, item)
node_obj = self.nodes[node];
end
local node_data = self.data[node];
- item.attr.publisher = actor;
+ if type(actor) == "string" then
+ item.attr.publisher = actor;
+ end
local ok = node_data:set(id, item);
if not ok then
return nil, "internal-server-error";