This module allows you to apply policies to occupants joining a MUC room, and choose an appropriate initial role for them.
Depending on configuration, someone who joins a MUC will usually be assigned one of two roles: “visitor”, or “participant”.
The “visitor” role does not have permission to speak in moderated rooms. The “participant” role may speak in moderated rooms.
By default, Prosody assigns “participant” when a MUC is not moderated, and “visitor” when it is moderated. This allows existing occupants to continue speaking when a MUC is switched from unmoderated to moderated (e.g. in response to abuse).
This module overrides the default behaviour, using other signals such as XEP-0489: Reporting Account Affiliations, (which is implemented in Prosody in mod_report_affiliations) to decide which role to assign by default.
This allows a smarter approach than simply assigning everyone “visitor” or “participant”.
Add the module to the MUC host (not the global modules_enabled):
Component "conference.example.com" "muc"
modules_enabled = { "muc_auto_role" }
You can define (globally or per-MUC component) the following options:
| Name | Default | Description |
|---|---|---|
| muc_auto_role_trusted_servers | {} |
A list of trusted servers to use RAA info from |
| muc_auto_role_trust_threshold | 51 |
The minimum RAA trust score which will be
considered trusted (for "participant" role) |
| muc_auto_role_untrusted_servers | {} |
A list of servers which will always use
the "visitor" role. |
| muc_default_role | "visitor" |
The default role to assign when no other policy fits |
Requires Prosody 13.0+
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_muc_auto_role
For earlier versions see the documentation for installing 3rd party modules