If you need to send a message to all users in a Mattermost Team to notify those users for something very important you can use this plugin. It will send a DM message with your message to all users, and if the email notification is enabled the users will get the email as well.
Use cases:
- Notify the user when will have some maintanance in the Mattermost instance.
- Communicate an important message to all users.
Upload your plugin and then go to the plugin settings to generate the internal Token.
To use the plugin, only users with the role of system administrators
can use that, for other users the command will be blocked.
You can use by typing /broadcast-message <YOUR MESSAGE>
or just /broadcast-message
, if you post the second it will open an dialog to you fill the message.
To avoid having to manually install your plugin, build and deploy your plugin using one of the following options.
If your Mattermost server is running locally, you can enable local mode to streamline deploying your plugin. Edit your server configuration as follows:
{
"ServiceSettings": {
...
"EnableLocalMode": true,
"LocalModeSocketLocation": "/var/tmp/mattermost_local.socket"
}
}
and then deploy your plugin:
make deploy
You may also customize the Unix socket path:
export MM_LOCALSOCKETPATH=/var/tmp/alternate_local.socket
make deploy
If developing a plugin with a webapp, watch for changes and deploy those automatically:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make watch
Alternatively, you can authenticate with the server's API with credentials:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password
make deploy
or with a personal access token:
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make deploy