Mercurial > prosody-modules
view mod_muc_auto_hats/README.md @ 6500:36b9d79e04b7
mod_muc_auto_hats: New module to dynamically assign hats based on config
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 25 Mar 2026 18:47:51 +0000 |
| parents | |
| children |
line wrap: on
line source
--- labels: - 'Stage-Alpha' summary: 'Dynamically set hats based on configurable policies' ... Introduction ============ This module lets you dynamically assign hats to MUC occupants based on configuration rules. Currently the only supported rule type is based on the host that the user is joining from. More rule types may be added in the future. Configuration ============= Add the module to the MUC host (not the global modules\_enabled): ``` {.lua} Component "conference.example.com" "muc" modules_enabled = { "muc_auto_hats" } ``` Then add configuration rules. Hats are identified by URIs, which must be unique (they are not displayed to the user). If you don't specify one, Prosody will generate a unique one for you. Each hat also has a human-readable 'title'. Again, Prosody will generate a default if you don't specify one. ## By user host ``` {.lua} muc_auto_hats_by_host = { ["anon.example.com"] = { title = "Web chat"; }; ["staff.example.com"] = { title = "Staff"; uri = "https://example.com/roles/staff"; }; } ``` Compatibility ============= Requires Prosody 13.0+
