diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ecf12602fb..f9550212447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Docs: https://docs.openclaw.ai - Security/sandbox: include Windows `USERPROFILE` in the sandbox blocked home roots so credential-bearing binds (such as `.codex`, `.openclaw`, or `.ssh` under the Windows user profile) are denied even when `HOME` points at a different shell home. (#63074) Thanks @luoyanglang. - Gateway/OpenAI-compatible HTTP: parse shared JSON endpoint paths without trusting malformed Host headers, avoiding 500s before `/v1/chat/completions`, `/v1/responses`, and `/v1/embeddings` request handling. - Telegram: keep Bot API polling alive during main event-loop stalls by moving ingress to an isolated worker with a durable local spool. Fixes #81132. (#81746) Thanks @joshavant. +- Telegram: resolve plugin native commands with the active runtime config so commands like `/codex ...` stay on the native command path. - Telegram: preserve rendered HTML formatting through lazy cron announce delivery so Markdown links stay clickable instead of falling back to literal anchor tags. Fixes #81742. (#81758) - Voice-call webhooks: parse webhook and realtime upgrade paths without trusting malformed Host headers, avoiding 500s before provider signature checks or path rejection. - Media store: reject malformed redirect `Location` headers as media-download failures instead of letting URL parsing escape the async response callback. diff --git a/extensions/telegram/src/bot-native-commands.test.ts b/extensions/telegram/src/bot-native-commands.test.ts index ccd27c58212..4a8b0ac7c32 100644 --- a/extensions/telegram/src/bot-native-commands.test.ts +++ b/extensions/telegram/src/bot-native-commands.test.ts @@ -284,6 +284,23 @@ describe("registerTelegramNativeCommands", () => { expect(registeredHandlers).not.toContain("export-session"); }); + it("resolves plugin commands with the Telegram runtime config", () => { + const cfg: OpenClawConfig = { + commands: { native: true }, + channels: { + telegram: { + dmPolicy: "open", + }, + }, + }; + + registerTelegramNativeCommands(createNativeCommandTestParams(cfg)); + + expect(pluginCommandMocks.getPluginCommandSpecs).toHaveBeenCalledWith("telegram", { + config: cfg, + }); + }); + it("registers only Telegram-safe command names across native, custom, and plugin sources", async () => { const setMyCommands = vi.fn().mockResolvedValue(undefined); diff --git a/extensions/telegram/src/bot-native-commands.ts b/extensions/telegram/src/bot-native-commands.ts index 5cdb282073b..99b97f31cae 100644 --- a/extensions/telegram/src/bot-native-commands.ts +++ b/extensions/telegram/src/bot-native-commands.ts @@ -732,7 +732,7 @@ export const registerTelegramNativeCommands = ({ const pluginCommandSpecs = ( telegramDeps.getPluginCommandSpecs ?? defaultTelegramNativeCommandDeps.getPluginCommandSpecs - )?.("telegram") ?? []; + )?.("telegram", { config: cfg }) ?? []; const existingCommands = new Set( [ ...nativeCommands.map((command) => normalizeTelegramCommandName(command.name)),