Mattermost-server: Slash integration "ephemeral" type attachment actions not showing up

Created on 16 Sep 2017  Â·  7Comments  Â·  Source: mattermost/mattermost-server

Summary

When adding an attachment to an ephemeral message response, the action's doesn't show up, preventing the user from interacting with the message.

Steps to reproduce

Have an integration server respond back with:
_Note: attachment won't show up unless you add "text" (related to https://github.com/mattermost/mattermost-server/issues/7453)_

{
  "response_type": "ephemeral",
  "text": " ",
  "attachments": [
    {
      "text": "This is the attachment text.",
      "actions": [
        {
          "name": "Update",
          "integration": {
            "url": "http://127.0.0.1:7357",
            "context": {
              "action": "do_something_update"
            }
          }
        }
      ]
    }
  ]
}

Expected behavior

The attachment appears with the buttons and the user is able to interact with the actions.

Observed behavior (that appears unintentional)

The text of the attachment shows up but not the buttons.

Possible fixes

Don't know yet still investigating the code more

Most helpful comment

I also have this issue, and I can confirm:

  1. That the buttons show up just fine if the response_type is marked as in_channel, but not if ephemeral.
  2. The command is posted in the center pane
  3. My settings are on Standard

All 7 comments

@guatedude2 thanks for the report!

1) Just to confirm, if the response_type is not ephemeral, then the buttons show up fine?
2) Is the slash command posted in the center pane, or as a reply to an existing message?
3) What is your preferences set to in Account Settings > Display > Message Display? (Standard/Compact)

I also have this issue, and I can confirm:

  1. That the buttons show up just fine if the response_type is marked as in_channel, but not if ephemeral.
  2. The command is posted in the center pane
  3. My settings are on Standard

I have Standard as my setting. The post is blank (no message).
When the text is set though, the attachment shows up but no action buttons appear

This is expected for now as there's a technical limitation here: Ephemeral messages by nature don't have any state, so there's nowhere to store the action on the back-end. If it's a big enough priority, we could probably make something work, but it would be non-trivial.

@guatedude2 @seansackowitz I submitted a pull request to update our docs, which clarifies that the response_type for the slash commands must be in_channel for message buttons to appear: https://github.com/mattermost/docs/pull/1510

If this is something you'd like to see, would you like to contribute this in the feature idea forum so it can be discussed and upvoted? Please include a link back to this GitHub Issue. If you're interested in implementing, please say so and we'll prioritize the review.

You get 10 votes in the feature idea forum, and each one influences the future of the project.

Thanks @seansackowitz! We'll monitor the feature proposal!

Closing this issue for now,

Was this page helpful?
0 / 5 - 0 ratings