Skip to content

fix: update SlackListsItemFieldMessage to support single and array message shapes#2627

Open
swayamsingh2004 wants to merge 2 commits into
slackapi:mainfrom
swayamsingh2004:fix/slack-lists-message-type
Open

fix: update SlackListsItemFieldMessage to support single and array message shapes#2627
swayamsingh2004 wants to merge 2 commits into
slackapi:mainfrom
swayamsingh2004:fix/slack-lists-message-type

Conversation

@swayamsingh2004

Copy link
Copy Markdown

Fixes #2598

Problem

SlackListsItemFieldMessage typed the message field as string[], which was incorrect in two ways:

  1. The Slack API can return message as either a single object or an array of objects
  2. The elements are message objects (with text, ts, etc.), not strings

Solution

  • Added a new SlackListsItemMessage interface with optional fields: text, ts, user, team, type
  • Changed message: string[] to message: SlackListsItemMessage | SlackListsItemMessage[] to handle both shapes the API can return

References

@swayamsingh2004 swayamsingh2004 requested a review from a team as a code owner June 14, 2026 21:22
@changeset-bot

changeset-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f0c9f1e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@slack/web-api Major
@slack/oauth Patch
@slack/rtm-api Patch
@slack/socket-mode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @swayamsingh2004 to sign the Salesforce Inc. Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SlackListsItem FieldMessage.message type does not match API response shape

1 participant