Mattermost backend for Errbot
Project description
Errbot Backend for Mattermost
REQUIREMENTS
- Mattermost with APIv4
- Python >= 3.4
- websockets 3.2
- mattermostdriver > 4.0
INSTALLATION
git clone https://github.com/errbotio/errbot-mattermost-backend.git
- Create an account for the bot on the server.
- Install the requirements.
- Open errbot's config.py:
BACKEND = 'Mattermost'
BOT_EXTRA_BACKEND_DIR = '/path/to/backends'
BOT_ADMINS = ('@yourname') # Names need the @ in front!
BOT_IDENTITY = {
# Required
'team': 'nameoftheteam',
'server': 'mattermost.server.com',
# For the login, either
'login': 'bot@email.de',
'password': 'botpassword',
# Or, if you have a personal access token
'token': 'YourPersonalAccessToken',
# Optional
'insecure': False, # Default = False. Set to true for self signed certificates
'scheme': 'https', # Default = https
'port': 8065, # Default = 8065
'timeout': 30, # Default = 30. If the webserver disconnects idle connections later/earlier change this value
'cards_hook': 'incomingWebhookId' # Needed for cards/attachments
}
- If the bot has problems doing some actions, you should make it system admin, some actions won't work otherwise.
Cards/Attachments
Cards are called attachments in Mattermost.
If you want to send attachments, you need to create an incoming Webhook in Mattermost
and add the webhook id to your errbot config.py
in BOT_IDENTITY
.
This is not an ideal solution, but AFAIK Mattermost does not support sending attachments
over the api like slack does.
APIv3
Use the APIv3 branch for that. It is no longer supported and not guaranteed to work!
Attention: The BOT_IDENTITY
config options are different for V3 and V4!
KNOWN (POSSIBLE) ISSUES
- Channelmentions in messages aren't accounted for (Unsure if they need to be)
FAQ
The Bot does not answer my direct messages
If you have multiple teams, check that you are both members of the same team!
SPECIAL THANKS
Thanks to http://errbot.io and all the contributors to the bot. Most of this code was build with help from the already existing backends, especially: https://github.com/errbotio/errbot/blob/master/errbot/backends/slack.py (If there is an Issue with any code I reused, please give me a message!)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file err-backend-mattermost-2.99.1.tar.gz
.
File metadata
- Download URL: err-backend-mattermost-2.99.1.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c09832b82938add34a33400bd37ea6ac23250ddeed034ef5e94b5cec8f11beab |
|
MD5 | 6d5e7f3c725cad1195c2e6259ffca818 |
|
BLAKE2b-256 | 5158d149ac5b03d78101c57acf724df2d0600b54f15fec31a463fea4543be0b0 |
File details
Details for the file err_backend_mattermost-2.99.1-py3-none-any.whl
.
File metadata
- Download URL: err_backend_mattermost-2.99.1-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cac93dbce5f86230a8b98c9d3ab7084c80b90f1a60ee7d1b62e1e38835fb4775 |
|
MD5 | 13db54fee38ca6498e98e87fad2b4a8a |
|
BLAKE2b-256 | 709fc8bc61caf9e64659c6dea178f3e06686876ea648fb3e5e58924aa06d023a |