Mattermost-server: [Help Wanted] [PLT-6403] Add Slack-compatible Action button for webhooks

Created on 2 May 2017  路  5Comments  路  Source: mattermost/mattermost-server

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide, specifically for machine setup and for developer workflow.


Notes: Jira ticket

Per this UserVoice request.

The scope of this ticket is limited to Message Buttons - Message Menus will be investigated separately in future, as it will be a much larger task to fully implement.

Developing this feature will necessitate:

  • Alterations to the configuration of Incoming Web Hooks (& potentially Slash Commands)
  • Additional server side code to support the action call-outs.
  • Additional API/App layer code to support the new integration message button presses.
  • Additional UI layer code to support the display (and API calls back to the server) of the message buttons.

If you wish to take on this ticket, once you have determined how you would like to implement each part of it, please discuss your plans with the core developer team in the ~developers channel of our Mattermost server.

Hard TecGo TecReactJS

Most helpful comment

On it.

All 5 comments

On it.

Hmm. While I could certainly add action buttons for webhooks, it looks like this would _not_ be Slack-compatible. Slack actually doesn't allow action buttons with webhooks. A Slack app is required in order to register action URLs (see FAQ: Message Buttons or Tutorial: Intro to Message Buttons). And we don't really have an equivalent to that right now.

So the options seem to be to either work on building out a system for Slack-compatible apps or implement this feature in a non-Slack-like way.

Gonna sync up with @jwilander and see how these options align with the developer toolkit roadmap / design.

We don't have Slack-compatible apps on the roadmap, so this can't be Slack compatible to the extent of being able to use existing Slack integrations with the feature, but I can make it as close as possible for now.

In Slack, interactive messages are configured in the Slack app settings:

screen shot 2017-07-17 at 8 54 59 pm

For interactive Mattermost messages, I'll most likely just be adding that "request URL" or "action URL" to the incoming webhook settings. And I'll be implementing Slack attachment buttons using the same format as Slack.

But since you can't just plug in your existing Slack apps anyways, I'd also be extremely interested in hearing ideas on what interactive capabilities people would find useful beyond what Slack currently offers.

For example, we would like to get this for the Giphy integration. Currently, the Slash command return a GIF and post to channel. It could be great to have the same behavior as the Slack integration for Giphy :

  • user use the /giphy command
  • the server return a set of 10 possible GIF. The message is hidden and the user can choose (with interaction buttons) to :

    • post the proposed GIF

    • switch to another GIF (don't know if it is client or server side, but we will handle it anyway)

    • cancel the command

Some screenshots :
1) I launch the /giphy command and server send me this
2) Don't like the GIF, so I click on Shuffle button and then got this
3) Like the new one so I click on Send button and it post the GIF

I don't know if it help, because I don't know how it run internally, but it is an interesting use case.

Closing the help wanted issue as we're working on this ticket internally.

Was this page helpful?
0 / 5 - 0 ratings