Skip to content

The 'value' property on ButtonAction is incorrectly typed #2133

@w33ble

Description

@w33ble

@slack/bolt version

3.18.0

Your App and Receiver Configuration

N/A

Node.js runtime version

v20.12.2

Steps to reproduce:

It's simple enough to prove that the value isn't always there...

  1. Create a bot with Interactivity
  2. Create an Interactivity webhook
  3. Post a message on Slack with an Button Block action that does not contain a value
  4. Click on that button
  5. Note that the body sent to the webhook has a payload where the object in actions does not contain a value

Example payload where actions array with no value in the object (truncated and unique identifiers changed):

{
  "type": "block_actions",
  // ...
  "actions": [
    {
      "action_id": "abc123",
      "block_id": "def456",
      "text": {
        "type": "plain_text",
        "text": "Hello World",
        "emoji": true
      },
      "type": "button",
      "action_ts": "1234567890.123456"
    }
  ]
}

Expected result:

The ButtonAction type should indicate that the value field is optional

Actual result:

The ButtonAction type indicates that the value field will always contain a string

See the type here.

Requirements

For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions