annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5938
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
1 <!--
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
2 SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
3 SPDX-License-Identifier: AGPL-3.0-only
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
4 -->
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
5 # mod_muc_moderation_delay
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
6
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
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.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
8
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
9 This module is under AGPL-3.0 license.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
10 This module can work on any Prosody server (version >= 0.12.x).
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
11 This module is still experimental.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
12
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
13 ## Configuration
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
14
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
15 Just enable the module on your MUC component.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
16 The feature will be accessible throught the room configuration form.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
17
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
18 The position in the room config form can be changed be setting the option `moderation_delay_form_position`.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
19 This value will be passed as priority for the "muc-config-form" hook.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
20 By default, the field will be between muc#roomconfig_changesubject and muc#roomconfig_moderatedroom.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
21
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
22 ``` lua
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
23 VirtualHost "muc.example.com"
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
24 modules_enabled = { "muc_moderation_delay" }
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
25 moderation_delay_form_position = 96
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
26 ```
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
27
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
28 ## Additional notes
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
29
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
30 For moderators, messages that are delayed will contain an extra `moderation-delay` xml tag, with `delay` and `waiting` attribute:
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
31
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
32 ```xml
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
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">
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
34 <body>Hello world</body>
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
35 <origin-id id="18821520-e49b-4e59-b6c6-b45cc133905d" xmlns="urn:xmpp:sid:0" />
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
36 <markable xmlns="urn:xmpp:chat-markers:0" />
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
37 <occupant-id id="V5gJudj4Ii3+LnikqUbSSH3NmPKO82zD+m7jRYushVY=" xmlns="urn:xmpp:occupant-id:0" />
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
38 <stanza-id xmlns="urn:xmpp:sid:0" id="xkf36aYefSmQ9evPo1m6Neei" by="8df24108-6e70-4fc8-b1cc-f2db7fcdd535@room.example.com" />
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
39 <moderation-delay delay="4" waiting="1720177157" />
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
40 </message>
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
41 ```
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
42
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
43 Note: the `waiting` attribute is the timestamp at which the message will be broadcasted.
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
44
959382fac20c mod_muc_moderation_delay: first commit to prosody-modules.
John Livingston <git@john-livingston.fr>
parents:
diff changeset
45 So compatible xmpp clients can display some information.