diff options
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 2 | ||||
-rw-r--r-- | util/pubsub.lua | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 37fbc902..810f608a 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -383,7 +383,7 @@ local function simple_itemstore(archive, config, node, expose_publisher) 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 --git a/util/pubsub.lua b/util/pubsub.lua index b063419e..159b16f3 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -273,6 +273,7 @@ function service:publish(node, actor, id, item) 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; |