Repository navigation
feat(dispatch): Start DM dispatches for linked provider identities - #2217
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Plugin webhook routes can call ctx.agent.dispatchForIdentity with a provider account id. Core binds the provider to the calling plugin and starts a private Slack DM dispatch only when that Identity is linked through OAuth to exactly one current Slack member of the bot workspace. Otherwise it returns not_linked before any model call. Refs #2207 Co-Authored-By: BYK <burak.kaya@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Step 2 of #2207. Plugin webhook routes get
ctx.agent.dispatchForIdentity({ subjectId, idempotencyKey, input, replyAttribution? }). It starts private work in a Slack DM for the person behind one provider account. The result is{ status: "created" | "already_exists", id }or{ status: "not_linked" }. The call does not throw because the person is untrusted.Core decides who counts, in code and before any model call:
junior,slack) never match.user, linked user). Handles, emails, and display names never match.not_linked.users.infomust show a current human member of the bot team: same team, not deleted, not a bot. This repeats the revocation check from Slack ingress.not_linked. Other Slack and storage errors reach the route.On a match, core opens the bot DM and creates a normal plugin dispatch with
privatevisibility and aprivate-direct-conversationcredential subject for that Slack user. Binding, validation, and enqueue use the same code as heartbeat dispatches. No second authority path exists.Not in this PR:
via BYK.
--
View Junior Session [Sentry]