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

Incompatible with incoming webhook payloads in slack block kit format #14973

Open
Dalabad opened this issue Jul 6, 2020 · 4 comments
Open

Incompatible with incoming webhook payloads in slack block kit format #14973

Dalabad opened this issue Jul 6, 2020 · 4 comments
Labels
Bug Report/Open Bug report/issue

Comments

@Dalabad
Copy link

Dalabad commented Jul 6, 2020

Summary

Incoming webhook messages in the "new" slack block kit format are ignoring the block content

Steps to reproduce

  • Create an incoming webhook link
  • Send the following Webhook content to the webhook url

curl -X POST \ -H 'Content-type: application/json; charset=utf-8' \ --data '{"attachments":[{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Some content for the first block"}},{"type":"divider"},{"type":"section","text":{"type":"mrkdwn","text":"Another block"}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"Button 1","emoji":true},"value":"click_me_123"}]}]}]}' \ https://mattermost-webhook-link.com/hooks/............

  • This works with all the examples/templates from the "block kit builder" page

Expected behavior

Here is a screenshot of what the webhook should look like on slack.

block-kit-slack

Observed behavior (that appears unintentional)

This screenshot shows, how the webhook is displayed by mattermost. The attachment part is displayed (visible by the box with the blue line on the left) but the content of the attachment block is completely missing. Blocks can also appear outside of the attachments block as it can be seen in the official block kit documentation.

block-kit-mattermost

@amyblais
Copy link
Member

amyblais commented Jul 6, 2020

@Dalabad Would you be open to confirming your Mattermost server version?

@Dalabad
Copy link
Author

Dalabad commented Jul 6, 2020

@amyblais Sure thing. My testing instance has the following version:

Mattermost Version: 5.21.0
Database Schema Version: 5.21.0
Database: postgres

@amyblais
Copy link
Member

amyblais commented Jul 6, 2020

Opened a ticket here: https://mattermost.atlassian.net/browse/MM-26729.

@amyblais amyblais added the Bug Report/Open Bug report/issue label Jul 6, 2020
@thinkmassive
Copy link

I created a very rudimentary solution using mitmproxy:
https://github.com/thinkmassive/mattermost-webhook-slack-proxy

It works for my purposes, but I'll be glad to improve it if anyone has feedback. I'm especially interested to know what FOSS applications people are using that send webhooks in "block kit" format, so I can understand what message formats should be handled until Mattermost has official support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report/Open Bug report/issue
Projects
None yet
Development

No branches or pull requests

3 participants