Software /
code /
prosody-modules
Annotate
mod_default_bookmarks/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 | 3237:420ebea00cf3 |
child | 5613:39bb7232326d |
rev | line source |
---|---|
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
1 --- |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
2 labels: |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
3 summary: Default bookmarked chatrooms |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
4 ... |
1782 | 5 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
6 Introduction |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
7 ============ |
1782 | 8 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
9 This module allows you to add default bookmarks for users. It only kicks |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
10 in when the user has no existing bookmarks, so users are free to add, |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
11 change or remove them. |
1782 | 12 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
13 Details |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
14 ======= |
1782 | 15 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
16 Most clients support storing a private list of room "bookmarks" on the |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
17 server. When they log in, they fetch this list and join any that are |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
18 marked as "autojoin". If this list is empty, as it would be for new |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
19 users, this module would return the list supplied in the config. |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
20 |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
21 Configuration |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
22 ============= |
1782 | 23 |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
24 Add "default\_bookmarks" to your modules\_enabled list: |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
25 |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
26 modules_enabled = { |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
27 -- ...other modules here... -- |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
28 "default_bookmarks"; |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
29 -- ...maybe some more here... -- |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
30 } |
1782 | 31 |
32 Then add a list of the default rooms you want: | |
33 | |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
34 default_bookmarks = { |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
35 { jid = "room@conference.example.com", name = "The Room" }; |
3237
420ebea00cf3
mod_default_bookmarks: Add support for <password/>.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
3236
diff
changeset
|
36 -- Specifying a password is supported: |
420ebea00cf3
mod_default_bookmarks: Add support for <password/>.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
3236
diff
changeset
|
37 { jid = "secret-room@conference.example.com", name = "A Secret Room", password = "secret" }; |
1803
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
38 -- You can also use this compact syntax: |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
39 "yetanother@conference.example.com"; -- this will get "yetanother" as name |
4d73a1a6ba68
Convert all wiki pages to Markdown
Kim Alvefur <zash@zash.se>
parents:
1782
diff
changeset
|
40 }; |
3236
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
41 |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
42 Compatibility |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
43 ------------- |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
44 |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
45 ------- --------------- |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
46 trunk Works |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
47 0.10 Should work |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
48 0.9 Should work |
73906187f964
mod_default_bookmarks: Add support for trunk’s mod_pep.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
1803
diff
changeset
|
49 ------- --------------- |