# HG changeset patch # User Emmanuel Gil Peyrot # Date 1631824379 -7200 # Node ID 1f1dbf652b3731f174cd9201df88758b54ad5cc3 # Parent 82dabfffaddfc5e0a800e1f4a2f57ad236d9bab0 mod_muc_require_tos: Send the message after the subject, once the client is fully joined diff -r 82dabfffaddf -r 1f1dbf652b37 mod_muc_require_tos/mod_muc_require_tos.lua --- a/mod_muc_require_tos/mod_muc_require_tos.lua Thu Sep 16 20:41:14 2021 +0200 +++ b/mod_muc_require_tos/mod_muc_require_tos.lua Thu Sep 16 22:32:59 2021 +0200 @@ -6,7 +6,7 @@ local yes_message = module:get_option_string("tos_yes_message"); local no_message = module:get_option_string("tos_no_message"); -module:hook("muc-occupant-joined", function(event) +module:hook("muc-occupant-session-new", function(event) local origin = event.origin; local room = event.room; local occupant = event.occupant; @@ -24,7 +24,7 @@ :tag("response", { xmlns = quick_response_ns, value = "no", label = "I decline." }):up(); origin.send(message); end -end); +end, 19); module:hook("muc-occupant-groupchat", function(event) local occupant = event.occupant;