aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-26 12:06:41 +0200
committerKim Alvefur <zash@zash.se>2017-04-26 12:06:41 +0200
commit3512924a628064a09bfa8ba5e0beed3c89601f5b (patch)
tree374dac90ac7048a2addd07b16c888615bf477747 /util/pubsub.lua
parent58ce210544fab1020fe8761f472e93f8846ffe64 (diff)
downloadprosody-3512924a628064a09bfa8ba5e0beed3c89601f5b.tar.gz
prosody-3512924a628064a09bfa8ba5e0beed3c89601f5b.zip
util.pubsub: Catch overriden id from storage
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua1
1 files changed, 1 insertions, 0 deletions
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;