aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/pubsub.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-11-09 17:22:47 +0100
committerKim Alvefur <zash@zash.se>2017-11-09 17:22:47 +0100
commit57b865f8b9a83f984d41d3374687a86b7245e22d (patch)
treeafdb782aa1e0b8bd1953b28a29e696f87e09251f /plugins/mod_pubsub/pubsub.lib.lua
parent30609c4da163329ea3076be8c24cc839b0365c9f (diff)
downloadprosody-57b865f8b9a83f984d41d3374687a86b7245e22d.tar.gz
prosody-57b865f8b9a83f984d41d3374687a86b7245e22d.zip
mod_pubsub: Allow itemstore to override item ids
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index 3146054e..8890392e 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -297,6 +297,9 @@ function handlers.set_publish(origin, stanza, publish, service)
local ok, ret = service:publish(node, stanza.attr.from, id, item);
local reply;
if ok then
+ if type(ok) == "string" then
+ id = ok;
+ end
reply = st.reply(stanza)
:tag("pubsub", { xmlns = xmlns_pubsub })
:tag("publish", { node = node })