Repository navigation
feat(types): add the user_connection and user_connection_status_requested events - #2783
Merged
WilliamBergamin merged 3 commits intoOct 22, 2026
Merged
Conversation
Slack sends this event when it has no connection status for a user, so apps answer with apps.user.connection.update. Adding it to SlackEvent types the event in Bolt listeners.
2 of 6 tasks
🦋 Changeset detectedLatest commit: b9234ac 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2783 +/- ##
=======================================
Coverage 89.34% 89.35%
=======================================
Files 65 65
Lines 10548 10548
Branches 480 480
=======================================
+ Hits 9424 9425 +1
+ Misses 1092 1091 -1
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Adds UserConnectionEvent, a union of the connect and disconnect subtypes, to SlackEvent. Checking subtype === 'connect' narrows trigger_id to a string, so Bolt listeners can open the connection modal without a cast. Also adds event_ts to UserConnectionStatusRequestedEvent, which every payload carries. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
WilliamBergamin
added a commit
to slack-samples/bolt-js-examples
that referenced
this pull request
Oct 22, 2026
The listener reads subtype, trigger_id, and user straight from the event now that slackapi/node-slack-sdk#2783 types user_connection, so the local typedef and cast are gone. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
WilliamBergamin
marked this pull request as ready for review
October 22, 2026 20:37
zimeg
approved these changes
Oct 22, 2026
zimeg
left a comment
Member
There was a problem hiding this comment.
🎁 @WilliamBergamin These changes are great and a gift for next release I think!
WilliamBergamin
deleted the
feat-user-connection-status-requested-event
branch
October 22, 2026 20:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds the
user_connectionanduser_connection_status_requestedevents to@slack/types.UserConnectionEventunion ofUserConnectionConnectEvent(subtype: 'connect', withtrigger_id) andUserConnectionDisconnectEvent(subtype: 'disconnect', with an optionalenterprise_id), added toSlackEvent. Checkingsubtype === 'connect'narrowstrigger_idto a string, so apps can open the connection modal without a cast.UserConnectionStatusRequestedEventinterface (type,user,event_ts), added toSlackEvent. Bolt listeners for this event now typeevent.user, which apps pass toapps.user.connection.update.Testing
From an app with
features.user_connectionsenabled and subscribed to both events:event.subtype,event.trigger_id, andevent.usertype-check without casts.user_connectionevent arrives withsubtype: 'connect'and opens the connection modal.user_connection_status_requestedevent arrives and the update succeeds.Requirements
🤖 Generated with Claude Code