Skip to content

An open-source, faster Devin alternative

TypeScript

api-edge: Slack Connect token is the OpenComputer app's bot token

utpal nadiger via Computera3292dee8397
diff --git a/cloudflare-workers/api-edge/src/index.ts b/cloudflare-workers/api-edge/src/index.ts
index 20ab4d5c..f2345cfc 100644
--- a/cloudflare-workers/api-edge/src/index.ts
+++ b/cloudflare-workers/api-edge/src/index.ts
@@ -185,8 +185,8 @@ export interface Env extends DashboardEnv, AgentFeedbackEnv, BillingEventsEnv {
// as the API key so /v3 sandboxes are owned by + billed to the customer org.
// Unset → the feature is inert (JWT keys rejected). See dashboard.ts.
OC_PROVISION_SECRET?: string;
- // Slack Connect per signup (slack_connect.ts), sent as a person via a user
- // token: dormant unless the token
+ // Slack Connect per signup (slack_connect.ts), sent by the OpenComputer
+ // Slack app: dormant unless the token
// and SINCE (unix seconds) are set.
SLACK_CONNECT_TOKEN?: string;
SLACK_CONNECT_SINCE?: string;
diff --git a/cloudflare-workers/api-edge/src/slack_connect.ts b/cloudflare-workers/api-edge/src/slack_connect.ts
index 9ff04e4f..09878467 100644
--- a/cloudflare-workers/api-edge/src/slack_connect.ts
+++ b/cloudflare-workers/api-edge/src/slack_connect.ts
@@ -6,10 +6,10 @@
// Runs on the */5 cron, never in the login path. A row in slack_connect_invites
// is the claim that a user is handled, so a re-run does nothing; a Slack error
// leaves the row pending and the next tick retries, up to MAX_ATTEMPTS.
-// SLACK_CONNECT_TOKEN is a user token (xoxp-, scopes channels:write,
-// channels:read, conversations.connect:write), so channels and invites come from
-// that person rather than a bot. The token's own user is the channel's creator
-// and is left out of the team invite.
+// SLACK_CONNECT_TOKEN is the OpenComputer app's bot token (xoxb-, scopes
+// channels:manage, channels:read, conversations.connect:write); a user token with
+// the matching user scopes works too. The token's own user is the channel's
+// creator and is left out of the team invite.
// Dormant unless SLACK_CONNECT_TOKEN and SLACK_CONNECT_SINCE are set; SINCE
// keeps the first deploy from inviting every user who signed up before it.