Mercurial > prosody-modules
annotate mod_muc_markers/README.markdown @ 4007:845d13ab0dc0
mod_muc_batched_probe: Call instance method
author | JC Brand <jc@opkode.com> |
---|---|
date | Fri, 01 May 2020 11:34:09 +0200 |
parents | 45c5603a6c07 |
children | 95882b487ed2 |
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 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 This module adds an internal Prosody API to retrieve the last received message by MUC occupants. |
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 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 There are no configuration options for this module. |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 # Developers |
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 ## Example usage |
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 ``` |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 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
|
37 |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 function something() |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 local last_received_id = muc_markers.get_user_read_marker("user@localhost", "room@conference.localhost"); |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 end |
45c5603a6c07
mod_muc_markers: New module for server-side receipt tracking in MUCs
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
41 ``` |