Software /
code /
prosody-modules
Changeset
3247:ada7a0c7221c
mod_pubsub_text_interface: Generate a stanza id for replies
This may be needed for some clients that de-duplicate messages based on stanza id.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 20 Aug 2018 22:52:20 +0200 |
parents | 3246:2a54b331f011 |
children | 3248:ecec46f7d020 |
files | mod_pubsub_text_interface/mod_pubsub_text_interface.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_text_interface/mod_pubsub_text_interface.lua Mon Aug 20 21:40:48 2018 +0200 +++ b/mod_pubsub_text_interface/mod_pubsub_text_interface.lua Mon Aug 20 22:52:20 2018 +0200 @@ -1,5 +1,6 @@ local st = require "util.stanza"; local jid = require "util.jid"; +local id = require "util.id"; local pubsub = module:depends "pubsub".service; @@ -23,6 +24,7 @@ local from = stanza.attr.from; local reply = st.reply(stanza); + reply.attr.id = id.medium(); if body == "help" then reply:body(help);