Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mattermost integration #2834

Closed
geromueller opened this issue Mar 15, 2016 · 18 comments
Closed

Add mattermost integration #2834

geromueller opened this issue Mar 15, 2016 · 18 comments
Labels
🎯 feature Categorizes as related to a new feature ☁️ plugin Maybe one day, who knows status: needs feedback Tell me more about it

Comments

@geromueller
Copy link

http://www.mattermost.org/ is a perfect match to gogs, as it is also in Go and uses same databases and is MIT licencend.

Mattermost should be Slack compatible, but currently it does not work.

The response is 500 "Channel not found.".

@unknwon unknwon added 🎯 feature Categorizes as related to a new feature ☁️ plugin Maybe one day, who knows labels Mar 15, 2016
@graywolf336
Copy link

Since both Mattermost and Rocket.Chat accept Slack's format of webhooks, I would like the option to turn the Slack webhook option into one where we can just input the url where we want the webhook to be posted to. This way we can ideally use it for both Mattermost and Rocket.Chat without much work.

@geekgonecrazy
Copy link

This would be great, looks like its just pulling the team name and id out of the url. So if we could just accept the URL as is?

@geromueller just a note. Only the binary they(mattermost) distributes is MIT. The source is AGPLv3 😦 got me at first too.

@engelgabriel
Copy link

It would be awesome to include Rocket.Chat integration too, should we open another issue for the feature request?

@graywolf336
Copy link

@engelgabriel The way I suggested in my comment above would eliminate the need to have chat specific plugins and instead have a "slack payload format", which both Rocket.Chat and Mattermost are able to use those.

@engelgabriel
Copy link

Yes, understood, but if it is not clearly stated that users can use Rocket.Chat, it may not be used. They can use the same code, but it would be nice if the name Rocket.Chat appears on the list.

@saboya
Copy link
Contributor

saboya commented Mar 19, 2016

Well, it already works. Just select Slack and set the payload URL to yout Mattermost webhook URL. I tested this today and it worked fine. Customizing icon URL did not work, but I'm unsure if this is a Gogs problem. More investigation is needed.

@graywolf336
Copy link

Due to @saboya's comment, I decided to give it another shot and it worked nicely with Rocket.Chat! The channel, username, icon url, and color all worked like one would expect them to on the push event (I haven't tested the Create event). So, maybe just a wording change is all that would be helpful for others.
screen shot 2016-03-19 at 9 47 08 pm

@unknwon
Copy link
Member

unknwon commented Mar 20, 2016

So.... what is the situation right now?

@unknwon unknwon added the status: needs feedback Tell me more about it label Mar 20, 2016
@saboya
Copy link
Contributor

saboya commented Mar 20, 2016

@unknwon Mattermost uses the same API as Slack for incoming webhooks, so it already works.

@unknwon
Copy link
Member

unknwon commented Mar 20, 2016

OK, closing now.

@unknwon unknwon closed this as completed Mar 20, 2016
@geromueller
Copy link
Author

Actually it does NOT work, thats what i wrote in my initial post. MM 2.1 requires the Channel field to be empty, but gogs requires this field. You receive the message "Channel not found!"

@saboya
Copy link
Contributor

saboya commented Mar 21, 2016

@geromueller I currently have MM 2.1 running, and it works just fine. Where in the documentation it says that channel has to be empty?

http://docs.mattermost.com/developer/webhooks-incoming.html

@engelgabriel
Copy link

@unknwon: Is it ok if we submit a PR with the changes on wording to explain that you can use the Slack integration for Rocket.Chat and Mattermost?

@unknwon
Copy link
Member

unknwon commented Mar 21, 2016

@engelgabriel Yes.

@engelgabriel
Copy link

@geekgonecrazy or @geekgonecrazy can you do this?

@geromueller
Copy link
Author

Since it works for @saboya i played around a bit. It indeed works but:

  • the MM docs says you should leave the channel empty, to use the channel assisiated with the api key in the hook (thats what i referred to by the initial post). Since this does not work in gogs you have to provide a channel
  • The channel name is all lower cases! That's why it did not work for me. I guess this is kind of of MM bug.

The ticket can stay closed in terms of implementation, but should be opened here or somewher else as text/docs is concerened.

Cheers!

@saboya
Copy link
Contributor

saboya commented Mar 21, 2016

The "empty channel" instruction is specific to the GitLab integration.

In regular use, the channel has to be the same as displayed in the channel URL. For example:

https://example.mattermostserver.com/TEAM_NAME/channels/CHANNEL_URL/

CHANNEL_URL would be the correct string to use.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🎯 feature Categorizes as related to a new feature ☁️ plugin Maybe one day, who knows status: needs feedback Tell me more about it
Projects
None yet
Development

No branches or pull requests

6 participants