Changeset

4693:59f53cf66573

mod_muc_require_tos: Generate a message id instead of hardcoding "foo"
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 16 Sep 2021 22:57:52 +0200
parents 4692:37232302dfb9
children 4694:6c57b9e31586
files mod_muc_require_tos/mod_muc_require_tos.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()