Annotate

mod_muc_batched_probe/README.markdown @ 5173:460f78654864

mod_muc_rtbl: also filter messages This was a bit tricky because we don't want to run the JIDs through SHA256 on each message. Took a while to come up with this simple plan of just caching the SHA256 of the JIDs on the occupants. This will leave some dirt in the occupants after unloading the module, but that should be ok; once they cycle the room, the hashes will be gone. This is direly needed, otherwise, there is a tight race between the moderation activities and the actors joining the room.
author Jonas Schäfer <jonas@wielicki.name>
date Tue, 21 Feb 2023 21:37:27 +0100
parent 4000:d56b3c0195a8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4000
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
1 # mod_muc_batched_probe
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
2
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
3 This module allows you to probe the presences of multiple MUC occupants or members.
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
4
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
5 XEP-0045 makes provision for MUC presence probes, which allows an entity to
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
6 probe for the presence information of a MUC occupant (or offline member).
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
7
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
8 See here: https://xmpp.org/extensions/xep-0045.html#bizrules-presence
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
9
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
10 This module creates the possibility to probe with a single IQ stanza the
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
11 presence information of multiple JIDs, instead of having to send out a presence
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
12 probe stanza per JID.
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
13
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
14 The IQ stanza needs to look as follows:
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
15
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
16 ```
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
17 <iq from="hag66@shakespeare.lit/pda"
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
18 id="zb8q41f4"
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
19 to="chat.shakespeare.lit"
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
20 type="get">
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
21
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
22 <query xmlns="http://jabber.org/protocol/muc#user">
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
23 <item jid="hecate@shakespeare.lit"/>
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
24 <item jid="crone1@shakespeare.lit"/>
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
25 <item jid="wiccarocks@shakespeare.lit"/>
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
26 <item jid="hag66@shakespeare.lit"/>
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
27 </query>
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
28 </iq>
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
29 ```
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
30
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
31
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
32
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
33 ## Configuration
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
34
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
35 Under your MUC component, add `muc_batched_probe` to `modules_enabled`
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
36
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
37 ```
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
38 Component "conference.example.org" "muc"
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
39 modules_enabled = {
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
40 "muc_batched_probe";
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
41 }
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
42 ```
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
43
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
44
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
45 ## Client Support
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
46
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
47 Converse.js has a plugin which supports this feature.
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
48
d56b3c0195a8 mod_muc_batched_probe: New module
JC Brand <jc@opkode.com>
parents:
diff changeset
49 https://www.npmjs.com/package/@converse-plugins/muc-presence-probe