aboutsummaryrefslogtreecommitdiffstats
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
commit280a866186134d05a41b35986e967f1063b6e89c (patch)
tree41a7408dd330299853765586305e373e3c967d19
parent0662d7b399963aab04a10138fc0578e02891b5ec (diff)
downloadprosody-280a866186134d05a41b35986e967f1063b6e89c.tar.gz
prosody-280a866186134d05a41b35986e967f1063b6e89c.zip
util.pubsub: Don't record publisher when superuser privileges are used (eg by modules)
-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";