This howto describes how to setup the Mattermost provider included in discourse-chat-integration.
Enable
The discourse-chat-integration plugin is bundled with Discourse. No separate installation is required. To enable it, check that the chat_integration_enabled site setting is turned on.
Notifications
Set up Mattermost
Your Mattermost server needs to be accessible from your Discourse server in order to connect them. It is recommended that you use HTTPS, but HTTP should also work.
In your Mattermost System Console, under Custom Integrations, check that these settings are enabled:
Enable Incoming Webhooks
Enable integrations to override usernames
Enable integrations to override profile picture icons
Enable Custom Slash Commands (if you want slash commands)
Login to your team, click your name in the top left, then click Integrations
Choose Incoming Webhooks, Add incoming Webhook
Enter a âDisplay Nameâ, âDescriptionâ, and choose a random channel from the list (it doesnât matter which one, Discourse will override this)
Paste the URL you copied into the chat_integration_mattermost_webhook_url site setting
Enable chat_integration_mattermost_enabled
Setup some âRulesâ for your channels, according to the discourse-chat-integration instructions. Channel identifiers look like #town-square or @davidtaylor.
Click Test on one of the channels to check everythingâs working. You should receive a message like this:
Hello! I am getting a broken image link to the right of the mattermost post. I tried to see the image url and it looks like an actual post instead of an image:
Make sure you copied the webhook URL correctly, and that there are no spaces before/after the URL. Is your mattermost server accessible to the internet? Or just an internal network?
3 Likes
csmu
(Keith John Hutchison - Ceiteach SeĂĄn Mac Ăistin)
12
Whatâs the best way to handle multiple teams / multiple mattermost servers?
I have chat integration with mattermost enabled - i subscribed to all âtop levelâ categories that are displayed via the â/discourse watchâ command but posts to âsub categoriesâ are not caught.
it is relayed to slack properly - but it is NOT relayed to mattermost. Slack is able to subscribe to âall categoriesâ. Mattermost does not seem to be able to.
Iâve tried all the syntax I can think of but Iâve not had luck. Any tips??
At the moment, sub-categories are not automatically included when you âwatchâ a category. Youâll need to either add every individual subcategory, or use the âall categoriesâ option.
Hey, thanks for replying!!! thatâd be sweet if I could figure out âhowâ. The only categories that the plugin seems to recognize are the topmost categories?
I found/tried the âall categoriesâ option but that also doesnât seem to work? Man Iâd really love to just use âallâ, thatâd be IDEAL⌠Am i âdoing it wrongâ? See screen cap below
Hi @david⌠the problem with the above is i cannot figure out how to sub to a âsubcategoryâ nor does there seem to be an âallâ i can use? Iâd love to get this figured out.
Using slash commands, I think you can watch all categories like this:
/discourse watch
But the easiest way to configure notification rules is from the Discourse admin panel. There, all the options are clearly displayed in the UI, so thereâs no need to try and work out the precise âslash commandâ syntax. Check out the âconfiguring rulesâ section of the pluginâs documentation for more info.
I posted a screen cap from the slash command before. reposting it here⌠you can see the âsub categoriesâ are not listed a post or two aboveâŚ
I had tried the admin page before but it would immediately close the dropdown when I used it⌠However pressing the âdown arrowâ seemed to jar whatever I needed loose.
I would REALLY like an âallâ option. Is this a plugin I can somehow edit/fix??? Right now it looks like this
(âno categoryâ in the dropdown is clearly a bad description of what it actually means. Iâll get that fixed up)
I think subcategories are ommitted from the help text for space. But you can still subscribe to categories by using their âslugâ (the name of the subcategory from the URL). So in the case of #howto:admins here on Meta, it would be /discourse watch admins.