Software /
code /
prosody
Diff
util/pubsub.lua @ 8220:a1b0fa38fca7
util.pubsub: Don't record publisher when superuser privileges are used (eg by modules)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 29 Jul 2017 13:09:57 +0200 |
parent | 8217:5f4e0d67b82a |
child | 8297:ac5c90230c2c |
line wrap: on
line diff
--- a/util/pubsub.lua Wed Apr 26 12:11:11 2017 +0200 +++ b/util/pubsub.lua Sat Jul 29 13:09:57 2017 +0200 @@ -268,7 +268,9 @@ 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";