fix: preserve telegram topic routing for native slash commands (#1587) (thanks @hsrvc)

This commit is contained in:
Peter Steinberger 2026-01-24 12:25:42 +00:00
parent 6c61c848a5
commit e9dc73a7dc
3 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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),