This module adds a Terms of Service message to Prosody rooms. Unlike mod_muc_require_tos this module does not enforce anything, it is an informational message. The module can used as TOS or as welcome message to new users for example.
The message is configured through the room configuration form and is sent as a MUC-PM to users when they join the room. The module keeps a per-room cache of users who have already received the message, so that the message is not sent repeatedly.
It is possible to send the message in a second language of the admins choosing. The module will by default reserve the nickname mod_muc_tos to send messages with it.
Add the module to the MUC Component:
Component "conference.example.com" "muc"
modules_enabled = {
"muc_tos";
-- The following global or per-MUC Component configuration options are available:
-- Maximum number of users kept in the per-room cache
-- It defaults to 400, Range 1-10000
muc_tos_max_users = 600
-- The nickname the module sends its TOS messages to users
-- It defaults to `mod_muc_tos`
muc_tos_module_nickname = "TOS_BOT"
-- Overwrite the default loglevel for the module (most logging is debug by default)
-- Allowed values are "debug", "info", "warn", "error"
muc_tos_loglevel = "info"
--[[
Lastely an option to delete all data this module collected,
set it to true to delete all data from its stores on module load.
The module will do nothing else while this setting is set.
Use it before you remove the module from the config to clean up:
]]
muc_tos_clear_all_data = true The TOS message itself is configured by the room owner from the room configuration form with ad-hoc enabled clients. Leave the message empty to disable the feature for a room.
Optionally use a second language field for a translation. The users client should show that second language version, if their enviroment prefers that language. You will need to fill out the field for the language code (fr, es, de …) as well as the second language field. The primary TOS message field must always be set. (It can be used for any non english language if you like too)
There is a room option to choose who gets a message, per sffiliation.
The module uses a keyval+ store named
muc_tos_store. Assuming file based storage, the information
will be stored at your storage location under
/path/to/prosody_data/your-muc-component/muc_tos_store/
Requires Prosody 13.0 or higher.
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_muc_tos
For earlier versions see the documentation for installing 3rd party modules