Software / code / prosody
Changeset
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 |
| parents | 8219:2e68ae095645 |
| children | 8221:4989a625419a |
| files | util/pubsub.lua |
| diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
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";