Skip to content

Commit e75abe5

Browse files
authored
Merge pull request #14 from odefun/ode_1770276377.365049
fix: use local bot token fallback
2 parents f5c4cbf + 2cb3402 commit e75abe5

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Ode is a Slack bot that bridges messages to OpenCode for AI-assisted coding.
1818
- Status updates include phases, tool progress, and elapsed time
1919
- Status messages are preserved as an operation record
2020
- When capturing screenshots, save images to the system temp folder and upload them to Slack as soon as possible
21+
- When merging PRs, do not delete the branch if the current worktree is on that branch
2122

2223
## Commands
2324
- Dev: `bun run dev`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ode",
3-
"version": "0.0.24",
3+
"version": "0.0.25",
44
"description": "Ode - OpenCode chat controller for Slack",
55
"module": "packages/core/index.ts",
66
"type": "module",

packages/ims/slack/client.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,13 @@ function resolveWorkspaceAuth(
293293
}
294294

295295
export function getChannelBotToken(channelId: string): string | undefined {
296-
return channelBotTokenMap.get(channelId);
296+
const mapped = channelBotTokenMap.get(channelId);
297+
if (!isLocalMode()) return mapped;
298+
if (mapped) return mapped;
299+
const tokens = getSlackBotTokens()
300+
.map((entry) => entry.token)
301+
.filter((token) => token && token.trim().length > 0);
302+
return tokens[0];
297303
}
298304

299305
function registerChannelBotToken(channelId: string, botToken: string | undefined): void {

0 commit comments

Comments
 (0)