Repository navigation
Conversation
🦋 Changeset detectedLatest commit: f91f6a4 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 @kyungyeon-byun-imweb-me to sign the Salesforce Inc. Contributor License Agreement. |
|
@salesforce-cla The license agreement has been signed. Thank you. |
mwbrooks
left a comment
There was a problem hiding this comment.
✅ Thanks @kyungyeon-byun-imweb-me! 🎉 Congrats on your first contribution to the Node Slack SDK, and thanks for the thorough tests too!
| retry_num: event.retry_attempt, | ||
| retry_reason: event.retry_reason, | ||
| accepts_response_payload: event.accepts_response_payload, | ||
| }); |
There was a problem hiding this comment.
suggestion (non-blocking): Could we debug-log when we skip the specific emit? It'll help someone wondering why their listener never fired.
| }); | |
| } else { | |
| this.logger.debug(`Received an events_api message without an event type (envelope_id: ${event.envelope_id})`); | |
| } |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2754 +/- ##
==========================================
+ Coverage 89.28% 89.32% +0.04%
==========================================
Files 65 65
Lines 10555 10562 +7
Branches 481 489 +8
==========================================
+ Hits 9424 9435 +11
+ Misses 1099 1095 -4
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
Fixes #2753.
SocketModeClientcurrently assumes everyevents_apipayload containspayload.event.type. Slack's documentedapp_rate_limitedpayload has its event type at the top level and no innerevent, so that assumption throws before consumers can acknowledge the envelope.This change:
app_rate_limited;slack_eventemission and ACK function;app_rate_limited, malformed payloads, and invalid inner-event type fallback;@slack/socket-mode.Validation completed:
npm run build --workspace=@slack/loggernpm run build --workspace=@slack/typesnpm run build --workspace=@slack/web-apinpm run build --workspace=@slack/socket-modenpm test --workspace=@slack/socket-mode(43 passing)npm run lintRequirements