Software /
code /
prosody
Changeset
8217:5f4e0d67b82a
util.pubsub: Catch overriden id from storage
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Apr 2017 12:06:41 +0200 |
parents | 8216:d80233ca006d |
children | 8218:2c75a5ba58fc |
files | plugins/mod_pubsub/pubsub.lib.lua util/pubsub.lua |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua Wed Apr 26 12:05:06 2017 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Wed Apr 26 12:06:41 2017 +0200 @@ -383,7 +383,7 @@ module:log("error", "Unable to set item: %s", err); return nil, err; end - return true; + return data; end return setmetatable(get_set, archive); end
--- a/util/pubsub.lua Wed Apr 26 12:05:06 2017 +0200 +++ b/util/pubsub.lua Wed Apr 26 12:06:41 2017 +0200 @@ -273,6 +273,7 @@ if not ok then return nil, "internal-server-error"; end + if type(ok) == "string" then id = ok; end self.events.fire_event("item-published", { node = node, actor = actor, id = id, item = item }); self.config.broadcaster("items", node, node_obj.subscribers, item, actor); return true;