Software /
code /
prosody-modules
Comparison
mod_muc_markers/README.md @ 6211:750d64c47ec6 draft default tip
Merge
author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
---|---|
date | Tue, 18 Mar 2025 00:31:36 +0700 |
parent | 6003:fe081789f7b5 |
comparison
equal
deleted
inserted
replaced
6210:24316a399978 | 6211:750d64c47ec6 |
---|---|
1 # Introduction | |
2 | |
3 This module adds an internal Prosody API to retrieve the last displayed message by MUC occupants. | |
4 | |
5 ## Requirements | |
6 | |
7 The clients must support XEP-0333, and the users to be tracked must be affiliated with the room. | |
8 | |
9 Currently due to lack of clarity about which id to use in acknowledgements in XEP-0333, this module | |
10 rewrites the id attribute of stanzas to match the stanza (archive) id assigned by the MUC server. | |
11 | |
12 Oh yeah, and mod_muc_mam is required (or another module that adds a stanza-id), otherwise this module | |
13 won't do anything. | |
14 | |
15 # Configuring | |
16 | |
17 ## Enabling | |
18 | |
19 ``` {.lua} | |
20 Component "rooms.example.net" "muc" | |
21 modules_enabled = { | |
22 "muc_markers"; | |
23 "muc_mam"; | |
24 } | |
25 ``` | |
26 | |
27 ## Settings | |
28 | |
29 | Name | Description | Default | | |
30 |----------------------------|--------------------------------------------------------------------------------------|-------------| | |
31 | muc_marker_summary_on_join | Whether a summary of all the latest markers should be sent to someone entering a MUC | true | | |
32 | muc_marker_type | The type of marker to track (displayed/received/acknowledged) | "displayed" | | |
33 | |
34 | |
35 # Developers | |
36 | |
37 ## Example usage | |
38 | |
39 ``` | |
40 local muc_markers = module:depends("muc_markers"); | |
41 | |
42 function something() | |
43 local last_displayed_id = muc_markers.get_user_read_marker("user@localhost", "room@conference.localhost"); | |
44 end | |
45 ``` |