Spoiler Plugin
This plugin creates a slash command to display spoiler messages in a non-spoiling way.
Compatibility
- This plugin is only compatible with Mattermost versions 5.3 and higher.
Usage
Type /spoiler
followed by your spoiler, then post your message. (The spoiler can be on more than one line, it can contain emojis, URLs, images, etc. All will be hidden.)
Two display modes are available for spoiler messages:
Installation and configuration
- Download the release package.
- Use the Mattermost
System Console > Plugins > Management
page to upload the package
- Activate the plugin in the
System Console > Plugins > Management
page
- Choose the display mode: go to the System Console > Plugins > Spoiler Command, select the mode and save the plugin's settings.
Manual configuration
If you need to enable & configure this plugin directly in the Mattermost configuration file config.json
, for example if you are doing a High Availability setup, you can use the following lines:
"PluginSettings": {
// [...]
"PluginStates": {
// [...]
"com.github.moussetc.mattermost.plugin.spoiler": {
"Enable": true,
"SpoilerMode": "button"
"IntegrationURL": ""
},
}
}
Development
Build the plugin with the following command:
make
This will produce a single plugin package (with support for multiple architectures) in dist/com.github.moussetc.mattermost.plugin.spoiler-X.X.X.tar.gz
To automate deploying and enabling the plugin to your server, add the following lines at the beginning of the Makefile (it requires http to be installed) and configure your admin login&password:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password
and use this command:
make deploy