Software /
code /
prosody
Changeset
8400:518b56d806bd
mod_pubsub: Allow itemstore to override item ids
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 09 Nov 2017 17:22:47 +0100 |
parents | 8399:07443fe9df5b |
children | 8401:f1923a79c93d |
files | plugins/mod_pubsub/pubsub.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 })