view mod_muc_markers/README.markdown @ 3973:df6227e288e5

mod_firewall: Fix use of unpack() on Lua 5.3 unpack() was previously a global function, it moved into the table library in either Lua 5.2 or 5.3
author Kim Alvefur <zash@zash.se>
date Mon, 13 Apr 2020 21:53:01 +0200
parents 45c5603a6c07
children 95882b487ed2
line wrap: on
line source

# Introduction

This module adds an internal Prosody API to retrieve the last received message by MUC occupants.

## Requirements

The clients must support XEP-0333, and the users to be tracked must be affiliated with the room.

Currently due to lack of clarity about which id to use in acknowledgements in XEP-0333, this module
rewrites the id attribute of stanzas to match the stanza (archive) id assigned by the MUC server.

Oh yeah, and mod_muc_mam is required (or another module that adds a stanza-id), otherwise this module
won't do anything.

# Configuring

## Enabling

``` {.lua}
Component "rooms.example.net" "muc"
modules_enabled = {
    "muc_markers";
    "muc_mam";
}
```

## Settings

There are no configuration options for this module.

# Developers

## Example usage

```
local muc_markers = module:depends("muc_markers");

function something()
	local last_received_id = muc_markers.get_user_read_marker("user@localhost", "room@conference.localhost");
end
```