|
1 | | -# Errbot Backend for Mattermost |
| 1 | +# Mattermost backend for Errbot |
2 | 2 |
|
3 | | -### REQUIREMENTS |
4 | | -- Mattermost with APIv4 |
5 | | -- Python >= 3.4 |
6 | | -- websockets 3.2 |
7 | | -- [mattermostdriver](https://github.com/Vaelor/python-mattermost-driver) > 4.0 |
| 3 | +This is the Mattermost backend for errbot. |
8 | 4 |
|
9 | | -### INSTALLATION |
| 5 | +# Documentation |
10 | 6 |
|
11 | | -- `git clone https://github.com/errbotio/errbot-mattermost-backend.git` |
12 | | -- Create an account for the bot on the server. |
13 | | -- Install the requirements. |
14 | | -- Open errbot's config.py: |
| 7 | +Visit the [official documentation](https://err-backend-mattermost.readthedocs.io/) where you'll find information on the following topics: |
| 8 | + - Installation |
| 9 | + - Configuration |
| 10 | + - User Guide |
| 11 | + - Developer Guide |
15 | 12 |
|
16 | | -``` |
17 | | -BACKEND = 'Mattermost' |
18 | | -BOT_EXTRA_BACKEND_DIR = '/path/to/backends' |
19 | | -
|
20 | | -BOT_ADMINS = ('@yourname') # Names need the @ in front! |
21 | | -
|
22 | | -BOT_IDENTITY = { |
23 | | - # Required |
24 | | - 'team': 'nameoftheteam', |
25 | | - 'server': 'mattermost.server.com', |
26 | | - # For the login, either |
27 | | - |
28 | | - 'password': 'botpassword', |
29 | | - # Or, if you have a personal access token |
30 | | - 'token': 'YourPersonalAccessToken', |
31 | | - # Optional |
32 | | - 'insecure': False, # Default = False. Set to true for self signed certificates |
33 | | - 'scheme': 'https', # Default = https |
34 | | - 'port': 8065, # Default = 8065 |
35 | | - 'timeout': 30, # Default = 30. If the webserver disconnects idle connections later/earlier change this value |
36 | | - 'cards_hook': 'incomingWebhookId' # Needed for cards/attachments |
37 | | -} |
38 | | -``` |
39 | | - |
40 | | -- If the bot has problems doing some actions, you should make it system admin, some actions won't work otherwise. |
41 | | - |
42 | | -### Cards/Attachments |
43 | | -Cards are called attachments in Mattermost. |
44 | | -If you want to send attachments, you need to create an incoming Webhook in Mattermost |
45 | | -and add the webhook id to your errbot `config.py` in `BOT_IDENTITY`. |
46 | | -This is not an ideal solution, but AFAIK Mattermost does not support sending attachments |
47 | | -over the api like slack does. |
48 | | - |
49 | | -### APIv3 |
50 | | -Use the APIv3 branch for that. It is no longer supported and not guaranteed to work! |
51 | | - |
52 | | -**Attention**: The `BOT_IDENTITY` config options are different for V3 and V4! |
53 | | - |
54 | | -### KNOWN (POSSIBLE) ISSUES |
55 | | - |
56 | | -- Channelmentions in messages aren't accounted for (Unsure if they need to be) |
57 | | - |
58 | | -### FAQ |
59 | | - |
60 | | -##### The Bot does not answer my direct messages |
61 | | -If you have multiple teams, check that you are both members of the same team! |
62 | | - |
63 | | -# SPECIAL THANKS |
64 | | - |
65 | | -**Thanks** to http://errbot.io and all the contributors to the bot. |
66 | | -Most of this code was build with help from the already existing backends, |
67 | | -especially: |
68 | | -https://github.com/errbotio/errbot/blob/master/errbot/backends/slack.py |
69 | | -(If there is an Issue with any code I reused, please give me a message!) |
0 commit comments