# HG changeset patch # User Kim Alvefur # Date 1534798340 -7200 # Node ID ada7a0c7221cb8137bf22050d7f26bc767281f85 # Parent 2a54b331f011ab35ab4790e3495d9d72515fc45e 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. diff -r 2a54b331f011 -r ada7a0c7221c mod_pubsub_text_interface/mod_pubsub_text_interface.lua --- 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);