slackapi / slackapi/deno-slack-runtime
Injecting correct `team_id` into function context
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Is there any timeframe on when they'll fix the api so it starts to either pass it, or at the very least so the CLI starts to set the correct team-id
My sandbox workspace config ends up like
{
"E0776TLA88G": {
"app_id": "xxx",
"enterprise_id": "E0776TLA88G",
"IsDev": true,
"team_domain": "cm-xxxx",
"team_id": "E0776TLA88G",
"user_id": "U076F75ED6Z"
}
}
But the app-install response correctly states
App successfully reinstalled
[2024-06-05 16:49:19] received: {"envelope_id":"2e43fb60-4cb0-4239-9365-1aa8f8034a03","payload":{"type":"block_actions","team":null,"enterprise":{"id":"E0776TLA88G","name":"cmbotsandbox"},"user":{"id":"U076F75ED6Z","name":"sd0776tdeq7j_user","team_id":"T076J49RGKC"}
The BaseRuntimeFunctionContext team_id is the same as the enterprise_id instead of being set to the team_id. Having to get around it using team_id: env["TEAM_ID"] || team_id || undefined,
Originally posted by @ChrisMcKee in https://github.com/slackapi/deno-slack-sdk/issues/267#issuecomment-2150524138
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at BaseRuntimeFunctionContext and compare its team_id with the app-install payload's user.team_id and enterprise.id values shown here. Done means the function context uses the actual team ID without requiring the env["TEAM_ID"] workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- deno, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100