fix: update SlackListsItemFieldMessage to support single and array message shapes#2627
Conversation
🦋 Changeset detectedLatest commit: 9df488e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Thanks for the contribution! Before we can merge this, we need @swayamsingh2004 to sign the Salesforce Inc. Contributor License Agreement. |
|
hi @swayamsingh2004 thank you for taking the time to fix this issue! I will take a look at the code and make sure its all correct for merge 💟 |
Updated SlackListsItemFieldMessage to handle both single and array message shapes.
srtaalej
left a comment
There was a problem hiding this comment.
LGTM and working well ⭐ ⭐ ⭐
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2627 +/- ##
=======================================
Coverage 88.88% 88.88%
=======================================
Files 62 62
Lines 10238 10238
Branches 451 451
=======================================
Hits 9100 9100
Misses 1117 1117
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Related issues across SDKsThis is the same underlying API inconsistency that was reported and fixed in the Java SDK:
|
Fixes #2598
Problem
SlackListsItemFieldMessagetyped themessagefield asstring[], which was incorrect in two ways:messageas either a single object or an array of objectstext,ts, etc.), not stringsSolution
SlackListsItemMessageinterface with optional fields:text,ts,user,team,typemessage: string[]tomessage: SlackListsItemMessage | SlackListsItemMessage[]to handle both shapes the API can returnReferences
SlackListsItem FieldMessage.messagetype does not match API response shape #2598