Unable to select options in weak dynamic message menu

Working with the Slack Team I want to have some message menus as an attachment. They must be dynamically populated, so I registered the URL for loading the parameters and added the following attachments to my message:

[{
  "text": "Request attributes",
  "fallback": "Upgrade your Slack client to use message like these.",
  "color": "#3AA3E3",
  "attachment_type": "default",
  "callback_id":"some ID",
  "actions": [{
    "name": "priority_list",
    "text": "Select a priority",
    "type": "select",
    "data_source": "external",
  }, {
      "name": "status_list",
      "text": "Select a status",
      "type": "select",
      "data_source": "external",
    }]
  }]

My parameter load url is correctly called slack, and here is what my server answers:

{
  options: [{
        text: 'Low',
        value: 'low'
    },
    {
        text: 'Medium',
        value: 'medium'
    },
    {
        text: 'High',
        value: 'high'
    }
],
  selected_options: [{
    text: 'High',
    value: 'high'
}]}

Looking at Slack, I see that the parameters are being dynamically populated. However, none of them are selected.

Am I missing something in the description selected_options?

+4
source share
1 answer

, selected_options . , , , , , .

0

Source: https://habr.com/ru/post/1679449/


All Articles