Compare commits
2 Commits
main
...
fix/telegr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9dc73a7dc | ||
|
|
6c61c848a5 |
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -311,6 +311,9 @@ export const registerTelegramNativeCommands = ({
|
||||
CommandTargetSessionKey: route.sessionKey,
|
||||
MessageThreadId: resolvedThreadId,
|
||||
IsForum: isForum,
|
||||
// Originating context for sub-agent announce routing
|
||||
OriginatingChannel: "telegram" as const,
|
||||
OriginatingTo: `telegram:${chatId}`,
|
||||
});
|
||||
|
||||
const disableBlockStreaming =
|
||||
|
||||
@ -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),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user