Mercurial > prosody-modules
annotate mod_muc_local_only/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 |
parents | 221b6bee26e2 |
children |
rev | line source |
---|---|
4019
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 # Introduction |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 This module allows you to make one or more MUCs as accessible to local users only. |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 # Details |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 Local users (anyone on the same server as the MUC) are granted automatic |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 membership when they first join the room. Users from other servers are |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 denied access (even if the room is otherwise configured to be open). |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 # Configuring |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 ## Enabling |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 ``` {.lua} |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 Component "rooms.example.net" "muc" |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 modules_enabled = { |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 "muc_local_only"; |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 } |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 ``` |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 ## Settings |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 Specify a list of MUCs in your config like so: |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 ``` |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 muc_local_only = { "my-local-chat@conference.example.com" } |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 ``` |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 # Compatibility |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 Requires Prosody 0.11.0 or later. |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 # Future |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 |
221b6bee26e2
mod_muc_local_only: New module to restrict a list of MUCs to local users
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 It would be good to add a room configuration option. |