Mercurial > prosody-modules
view mod_muc_moderation_delay/mod_muc_moderation_delay.lua @ 6083:ffd0184cd478
mod_compliance_latest: New module that depends on and therefore loads the latest compliance tester mod.
diff --git a/mod_compliance_latest/README.md b/mod_compliance_latest/README.md
new file mode 100644
--- /dev/null
+++ b/mod_compliance_latest/README.md
@@ -0,0 +1,25 @@
+---
+summary: XMPP Compliance Suites self-test
+labels:
+- Stage-Beta
+rockspec:
+ dependencies:
+ - mod_compliance_2023
+...
+
+# Introduction
+
+This module will always require and load to the lastest compliance tester we have in the community modules.
+Currently this is [mod_compliance_2023].
+
+# Configuration
+
+Just load this module as any other module and it will automatically install [mod_compliance_2023] if you use the Prosody plugin installer.
+See the linked module for further details.
+
+# Compatibility
+
+ Prosody-Version Status
+ --------------- ----------------------
+ trunk Works as of 2024-12-22
+ 0.12 Works
diff --git a/mod_compliance_latest/mod_compliance_latest.lua b/mod_compliance_latest/mod_compliance_latest.lua
new file mode 100644
--- /dev/null
+++ b/mod_compliance_latest/mod_compliance_latest.lua
@@ -0,0 +1,1 @@
+module:depends("compliance_2023");
| author | Menel <menel@snikket.de> |
|---|---|
| date | Sun, 22 Dec 2024 18:12:42 +0100 |
| parents | 959382fac20c |
| children |
line wrap: on
line source
-- mod_muc_moderation_delay -- -- SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/> -- SPDX-License-Identifier: AGPL-3.0-only -- -- This file is AGPL-v3 licensed. -- Please see the Peertube livechat plugin copyright information. -- https://livingston.frama.io/peertube-plugin-livechat/credits/ -- local add_disco_form = module:require("config").add_disco_form; local config_submitted = module:require("config").config_submitted; local add_form_option = module:require("config").add_form_option; local handle_broadcast_message = module:require("delay").handle_broadcast_message; -- form_position: the position in the room config form (this value will be passed as priority for the "muc-config-form" hook). -- By default, field will be between muc#roomconfig_changesubject and muc#roomconfig_moderatedroom local form_position = module:get_option_number("moderation_delay_form_position") or 80-2; -- Plugin dependencies local mod_muc = module:depends "muc"; -- muc-disco and muc-config to configure the feature: module:hook("muc-disco#info", add_disco_form); module:hook("muc-config-submitted/muc#roomconfig_moderation_delay", config_submitted); module:hook("muc-config-form", add_form_option, form_position); -- intercept muc-broadcast-message, and broadcast with delay if required. -- Priority is negative, as we want it to be the last handler. module:hook("muc-broadcast-message", handle_broadcast_message, -1000);
