Skip to content

Add isExternalChannel support to Thread, Channel, and Slack adapter#51

Open
nandorojo wants to merge 4 commits intomainfrom
v0/fernandorojo-867fa5c0
Open

Add isExternalChannel support to Thread, Channel, and Slack adapter#51
nandorojo wants to merge 4 commits intomainfrom
v0/fernandorojo-867fa5c0

Conversation

@nandorojo
Copy link
Collaborator

@nandorojo nandorojo commented Feb 17, 2026

Slack Connect channels can leak internal context (repo summaries, etc.) to external organizations. This adds isExternalChannel: boolean to the SDK so consumers can gate behavior based on whether a thread is in an externally shared channel.

What changed

  • Added optional isExternalChannel?(threadId) method to the Adapter interface, following the same pattern as isDM?
  • Added readonly isExternalChannel: boolean to Postable, Thread, and Channel interfaces and their implementations (ThreadImpl, ChannelImpl)
  • Added isExternalChannel to ThreadInfo, ChannelInfo, and SerializedThread/SerializedChannel for serialization support
  • Chat.createThread() now calls adapter.isExternalChannel?.(threadId) ?? false and passes it through
  • Slack adapter: reads is_ext_shared_channel from the webhook payload envelope and caches it per channel ID in a Set. Also reads is_ext_shared from conversations.info API responses in fetchThread and fetchChannelInfo. Implements isExternalChannel(threadId) that checks the cache.
  • Other adapters (Discord, Teams, GChat, GitHub, Linear) don't need changes since the method is optional and defaults to false
  • Added mock adapter support and 5 new tests covering serialization, round-tripping, and channel inheritance
  • Committed the implementation plan to .v0/plans/add-is-external-channel.md

All 358 tests pass.

Slack Thread

Co-authored-by: Fernando Rojo <13172299+nandorojo@users.noreply.github.com>
@vercel
Copy link
Contributor

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
the-real-chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Feb 25, 2026 0:09am
v0-chat-fy Error Error Open in v0 Feb 25, 2026 0:09am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
chat Ignored Ignored Preview, Open in v0 Feb 25, 2026 0:09am

@github-actions
Copy link
Contributor

Preview Branch Testing

To test this PR with real webhook traffic:

  1. Go to /settings on the production deployment
  2. Enter this PR's Vercel preview URL
  3. Save - all webhook requests will now be proxied to this preview

To disable: Clear the URL on the settings page.

Co-authored-by: Fernando Rojo <13172299+nandorojo@users.noreply.github.com>
haydenbleasel and others added 2 commits February 24, 2026 16:06
# Conflicts:
#	packages/adapter-slack/src/index.ts
#	packages/chat/src/channel.ts
#	packages/chat/src/serialization.test.ts
#	packages/chat/src/thread.ts
#	packages/chat/src/types.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@haydenbleasel
Copy link
Member

@nandorojo updated this branch for ye

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants