# HG changeset patch # User Emmanuel Gil Peyrot # Date 1631825872 -7200 # Node ID 59f53cf665735fa3ea457c20b4e1f4cc8941a1fa # Parent 37232302dfb9398a7b2f1df190d62b3c95450fa9 mod_muc_require_tos: Generate a message id instead of hardcoding "foo" diff -r 37232302dfb9 -r 59f53cf66573 mod_muc_require_tos/mod_muc_require_tos.lua --- a/mod_muc_require_tos/mod_muc_require_tos.lua Thu Sep 16 22:47:52 2021 +0200 +++ b/mod_muc_require_tos/mod_muc_require_tos.lua Thu Sep 16 22:57:52 2021 +0200 @@ -1,4 +1,5 @@ local jid = require "util.jid"; +local id = require "util.id"; local st = require "util.stanza"; local quick_response_ns = "urn:xmpp:tmp:quick-response"; @@ -17,7 +18,7 @@ type = "groupchat", to = occupant.nick, from = room.jid, - id = "foo", + id = id.medium(), ["xml:lang"] = "en", }, welcome_message) :tag("response", { xmlns = quick_response_ns, value = "yes", label = "I accept." }):up()