# HG changeset patch # User Kim Alvefur # Date 1493201201 -7200 # Node ID 5f4e0d67b82ae03b721d5d2f06d9d5ea50082641 # Parent d80233ca006d4a8af82adb42929f70b4d26e5c01 util.pubsub: Catch overriden id from storage diff -r d80233ca006d -r 5f4e0d67b82a plugins/mod_pubsub/pubsub.lib.lua --- 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 diff -r d80233ca006d -r 5f4e0d67b82a util/pubsub.lua --- 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;