From 4975573369ffc80dfc61a8eb9329bd540cc56bd3 Mon Sep 17 00:00:00 2001 From: Loki FastStart Date: Sat, 9 May 2026 22:27:43 +0000 Subject: [PATCH] fix: /model chatId extraction uses index [1] not [0] Thread ID format is telegram:[:threadId], so split(":")[0] gives "telegram" not the chatId. Fixed to use [1]. --- src/gateway/model-command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gateway/model-command.ts b/src/gateway/model-command.ts index 58ec106..0e98848 100644 --- a/src/gateway/model-command.ts +++ b/src/gateway/model-command.ts @@ -88,7 +88,7 @@ export async function handleModel(ctx: ModelCommandContext): Promise { // Try to send with inline keyboard via telegramFetch const adapter = thread?.adapter; if (adapter?.telegramFetch) { - const chatId = thread?.platformThreadId?.split(":")?.[0] ?? thread?.id?.split(":")?.[0]; + const chatId = thread?.platformThreadId?.split(":")?.[1] ?? thread?.id?.split(":")?.[1]; if (chatId) { try { await adapter.telegramFetch("sendMessage", {