diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aa71148a..43ef30c9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Docs: https://docs.clawd.bot - Discord: retry rate-limited allowlist resolution + command deploy to avoid gateway crashes. (commit f70ac0c7c) - Mentions: ignore mentionPattern matches when another explicit mention is present in group chats (Slack/Discord/Telegram/WhatsApp). (commit d905ca0e0) - Telegram: render markdown in media captions. (#1478) +- Telegram: preserve topic routing for native slash command sub-agent announcements. (#1587) Thanks @hsrvc. - MS Teams: remove `.default` suffix from Graph scopes and Bot Framework probe scopes. (#1507, #1574) Thanks @Evizero. - Browser: keep extension relay tabs controllable when the extension reuses a session id after switching tabs. (#1160) - Voice wake: auto-save wake words on blur/submit across iOS/Android and align limits with macOS. (commit 69f645c66) diff --git a/src/discord/monitor/provider.ts b/src/discord/monitor/provider.ts index d55e06c4c..67143509a 100644 --- a/src/discord/monitor/provider.ts +++ b/src/discord/monitor/provider.ts @@ -1,3 +1,4 @@ +import { inspect } from "node:util"; import { Client } from "@buape/carbon"; import { GatewayIntents, GatewayPlugin } from "@buape/carbon/gateway"; import { Routes } from "discord-api-types/v10"; @@ -95,7 +96,7 @@ function formatDiscordDeployErrorDetails(err: unknown): string { try { bodyText = JSON.stringify(rawBody); } catch { - bodyText = String(rawBody); + bodyText = inspect(rawBody, { depth: 4, breakLength: 120 }); } if (bodyText) { const maxLen = 800; diff --git a/src/telegram/bot.test.ts b/src/telegram/bot.test.ts index cb1ee3381..ba63b3a20 100644 --- a/src/telegram/bot.test.ts +++ b/src/telegram/bot.test.ts @@ -2187,6 +2187,11 @@ describe("createTelegramBot", () => { match: "", }); + expect(replySpy).toHaveBeenCalledTimes(1); + const payload = replySpy.mock.calls[0][0]; + expect(payload.OriginatingChannel).toBe("telegram"); + expect(payload.OriginatingTo).toBe("telegram:-1001234567890"); + expect(payload.MessageThreadId).toBe(99); expect(sendMessageSpy).toHaveBeenCalledWith( "-1001234567890", expect.any(String),