comparison mod_muc_moderation_delay/README.markdown @ 5938:959382fac20c

mod_muc_moderation_delay: first commit to prosody-modules.
author John Livingston <git@john-livingston.fr>
date Fri, 26 Jul 2024 15:36:05 +0200
parents
children
comparison
equal deleted inserted replaced
5937:da942a3f3660 5938:959382fac20c
1 <!--
2 SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
3 SPDX-License-Identifier: AGPL-3.0-only
4 -->
5 # mod_muc_moderation_delay
6
7 With this module, you can apply a delay to groupchat messages delivery, so that room moderators can moderate them before other participants receives them.
8
9 This module is under AGPL-3.0 license.
10 This module can work on any Prosody server (version >= 0.12.x).
11 This module is still experimental.
12
13 ## Configuration
14
15 Just enable the module on your MUC component.
16 The feature will be accessible throught the room configuration form.
17
18 The position in the room config form can be changed be setting the option `moderation_delay_form_position`.
19 This value will be passed as priority for the "muc-config-form" hook.
20 By default, the field will be between muc#roomconfig_changesubject and muc#roomconfig_moderatedroom.
21
22 ``` lua
23 VirtualHost "muc.example.com"
24 modules_enabled = { "muc_moderation_delay" }
25 moderation_delay_form_position = 96
26 ```
27
28 ## Additional notes
29
30 For moderators, messages that are delayed will contain an extra `moderation-delay` xml tag, with `delay` and `waiting` attribute:
31
32 ```xml
33 <message xmlns="jabber:client" type="groupchat" id="18821520-e49b-4e59-b6c6-b45cc133905d" to="root@example.com/QH1H89H1" xml:lang="en" from="8df24108-6e70-4fc8-b1cc-f2db7fcdd535@room.example.com/root">
34 <body>Hello world</body>
35 <origin-id id="18821520-e49b-4e59-b6c6-b45cc133905d" xmlns="urn:xmpp:sid:0" />
36 <markable xmlns="urn:xmpp:chat-markers:0" />
37 <occupant-id id="V5gJudj4Ii3+LnikqUbSSH3NmPKO82zD+m7jRYushVY=" xmlns="urn:xmpp:occupant-id:0" />
38 <stanza-id xmlns="urn:xmpp:sid:0" id="xkf36aYefSmQ9evPo1m6Neei" by="8df24108-6e70-4fc8-b1cc-f2db7fcdd535@room.example.com" />
39 <moderation-delay delay="4" waiting="1720177157" />
40 </message>
41 ```
42
43 Note: the `waiting` attribute is the timestamp at which the message will be broadcasted.
44
45 So compatible xmpp clients can display some information.