# HG changeset patch # User Kim Alvefur # Date 1510244567 -3600 # Node ID 518b56d806bd9c7b9be9ebfea7e62b7b4832021c # Parent 07443fe9df5bc21859644ffbd0de5217d6c2fa99 mod_pubsub: Allow itemstore to override item ids diff -r 07443fe9df5b -r 518b56d806bd plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Thu Nov 09 17:21:50 2017 +0100 +++ b/plugins/mod_pubsub/pubsub.lib.lua Thu Nov 09 17:22:47 2017 +0100 @@ -297,6 +297,9 @@ 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 })