Mercurial > prosody-modules
annotate mod_muc_markers/README.markdown @ 4333:97f369745ec7
mod_cloud_notify_encrypted: Use new direct access to notification element
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 13 Jan 2021 15:01:59 +0000 |
parents | 95882b487ed2 |
children | 83f89ffe427b |
rev | line source |
---|---|
3972
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 # Introduction |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 |
4024
95882b487ed2
mod_muc_markers: Allow configuration of which marker to track, default to displayed
Matthew Wild <mwild1@gmail.com>
parents:
3972
diff
changeset
|
3 This module adds an internal Prosody API to retrieve the last displayed message by MUC occupants. |
3972
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 ## Requirements |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 The clients must support XEP-0333, and the users to be tracked must be affiliated with the room. |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 Currently due to lack of clarity about which id to use in acknowledgements in XEP-0333, this module |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 rewrites the id attribute of stanzas to match the stanza (archive) id assigned by the MUC server. |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 Oh yeah, and mod_muc_mam is required (or another module that adds a stanza-id), otherwise this module |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 won't do anything. |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 # Configuring |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 ## Enabling |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 ``` {.lua} |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 Component "rooms.example.net" "muc" |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 modules_enabled = { |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 "muc_markers"; |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 "muc_mam"; |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 } |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 ``` |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 ## Settings |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 |
4024
95882b487ed2
mod_muc_markers: Allow configuration of which marker to track, default to displayed
Matthew Wild <mwild1@gmail.com>
parents:
3972
diff
changeset
|
29 | Name | Description | Default | |
95882b487ed2
mod_muc_markers: Allow configuration of which marker to track, default to displayed
Matthew Wild <mwild1@gmail.com>
parents:
3972
diff
changeset
|
30 |-----------------|--------------------------------------------------------------|------------| |
95882b487ed2
mod_muc_markers: Allow configuration of which marker to track, default to displayed
Matthew Wild <mwild1@gmail.com>
parents:
3972
diff
changeset
|
31 | muc_marker_type | The type of marker to track (displayed/received/acknowledged)| "displayed"| |
3972
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 # Developers |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 ## Example usage |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 ``` |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 local muc_markers = module:depends("muc_markers"); |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 function something() |
4024
95882b487ed2
mod_muc_markers: Allow configuration of which marker to track, default to displayed
Matthew Wild <mwild1@gmail.com>
parents:
3972
diff
changeset
|
41 local last_displayed_id = muc_markers.get_user_read_marker("user@localhost", "room@conference.localhost"); |
3972
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
42 end |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
43 ``` |