From a957f6c038290ebec028cc6bda8edfcf1844a7a8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 9 Nov 2017 17:22:47 +0100 Subject: mod_pubsub: Allow itemstore to override item ids --- plugins/mod_pubsub/pubsub.lib.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/mod_pubsub') 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 }) -- cgit v1.2.3