Software /
code /
prosody-modules
Comparison
mod_muc_slow_mode/README.md @ 6211:750d64c47ec6 draft default tip
Merge
author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
---|---|
date | Tue, 18 Mar 2025 00:31:36 +0700 |
parent | 6003:fe081789f7b5 |
comparison
equal
deleted
inserted
replaced
6210:24316a399978 | 6211:750d64c47ec6 |
---|---|
1 <!-- | |
2 SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/> | |
3 SPDX-License-Identifier: AGPL-3.0-only | |
4 --> | |
5 # mod_muc_slow_mode | |
6 | |
7 This module is a custom module that allows slow mode for MUC rooms. | |
8 | |
9 This module is under AGPL-3.0 license. | |
10 | |
11 There will probably be a XEP proposal for this module behaviour. | |
12 | |
13 ## Slow mode definition | |
14 | |
15 There are some contexts in which you want to be able to rate limit MUC messages. This could have multiple motivations: avoid flooding, garantee a better readability of the room when there are hundreds of active users, … | |
16 | |
17 This module propose a new option for MUC rooms, allowing room owners to fix a duration that users must wait between two messages. | |
18 | |
19 There is a draft XEP for this feature, that you can find here: https://github.com/JohnXLivingston/xeps/blob/xep-slow-mode/xep-slow-mode.xml | |
20 | |
21 There is a more human-readable version of this XEP here: https://livingston.frama.io/peertube-plugin-livechat/technical/slow_mode/ | |
22 | |
23 ## Configuration | |
24 | |
25 Just enable the module on your MUC component. | |
26 The feature will be accessible throught the room configuration form. | |
27 | |
28 Depending on your application, it is possible that the slow mode is more important than other fields (for example for a video streaming service). | |
29 The position in the room config form can be changed be setting the option `slow_mode_duration_form_position`. | |
30 This value will be passed as priority for the "muc-config-form" hook. | |
31 By default, the field will be between muc#roomconfig_changesubject and muc#roomconfig_moderatedroom. | |
32 | |
33 ``` lua | |
34 VirtualHost "muc.example.com" | |
35 modules_enabled = { "muc_slow_mode" } | |
36 slow_mode_duration_form_position = 96 | |
37 ``` |