Software /
code /
prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 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 |
parent | 8399:07443fe9df5b |
child | 8814:07197f29e2b8 |
comparison
equal
deleted
inserted
replaced
8399:07443fe9df5b | 8400:518b56d806bd |
---|---|
295 end | 295 end |
296 end | 296 end |
297 local ok, ret = service:publish(node, stanza.attr.from, id, item); | 297 local ok, ret = service:publish(node, stanza.attr.from, id, item); |
298 local reply; | 298 local reply; |
299 if ok then | 299 if ok then |
300 if type(ok) == "string" then | |
301 id = ok; | |
302 end | |
300 reply = st.reply(stanza) | 303 reply = st.reply(stanza) |
301 :tag("pubsub", { xmlns = xmlns_pubsub }) | 304 :tag("pubsub", { xmlns = xmlns_pubsub }) |
302 :tag("publish", { node = node }) | 305 :tag("publish", { node = node }) |
303 :tag("item", { id = id }); | 306 :tag("item", { id = id }); |
304 else | 307 else |