diff --git a/CHANGELOG.md b/CHANGELOG.md index b95d8a0c2eb..f6fc92252e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Cron/Delivery: disable the agent messaging tool when `delivery.mode` is `"none"` so cron output is not sent to Telegram or other channels. (#21808) - Feishu/Reply media attachments: send Feishu reply `mediaUrl`/`mediaUrls` payloads as attachments alongside text/streamed replies in the reply dispatcher, including legacy fallback when `mediaUrls` is empty. (#28959) - Feishu/Reaction notifications: add `channels.feishu.reactionNotifications` (`off | own | all`, default `own`) so operators can disable reaction ingress or allow all verified reaction events (not only bot-authored message reactions). (#28529) - Feishu/Outbound session routing: stop assuming bare `oc_` identifiers are always group chats, honor explicit `dm:`/`group:` prefixes for `oc_` chat IDs, and default ambiguous bare `oc_` targets to direct routing to avoid DM session misclassification. (#10407) Thanks @Bermudarat. diff --git a/src/cron/delivery.test.ts b/src/cron/delivery.test.ts index d2e9223cd13..7cc690f79cf 100644 --- a/src/cron/delivery.test.ts +++ b/src/cron/delivery.test.ts @@ -43,29 +43,16 @@ describe("resolveCronDeliveryPlan", () => { expect(plan.requested).toBe(false); }); - it("passes through accountId from delivery config", () => { + it("resolves mode=none with requested=false and no channel (#21808)", () => { const plan = resolveCronDeliveryPlan( makeJob({ - delivery: { - mode: "announce", - channel: "telegram", - to: "-1003816714067", - accountId: "coordinator", - }, + delivery: { mode: "none", to: "telegram:123" }, }), ); - expect(plan.mode).toBe("announce"); - expect(plan.accountId).toBe("coordinator"); - expect(plan.to).toBe("-1003816714067"); - }); - - it("returns undefined accountId when not set", () => { - const plan = resolveCronDeliveryPlan( - makeJob({ - delivery: { mode: "announce", channel: "telegram", to: "123" }, - }), - ); - expect(plan.accountId).toBeUndefined(); + expect(plan.mode).toBe("none"); + expect(plan.requested).toBe(false); + expect(plan.channel).toBeUndefined(); + expect(plan.to).toBe("telegram:123"); }); it("resolves webhook mode without channel routing", () => { diff --git a/src/cron/isolated-agent/run.ts b/src/cron/isolated-agent/run.ts index f9875e1212a..16a69cf5711 100644 --- a/src/cron/isolated-agent/run.ts +++ b/src/cron/isolated-agent/run.ts @@ -470,7 +470,7 @@ export async function runCronIsolatedAgentTurn(params: { // was successfully resolved. When resolution fails the agent should not // be blocked by a target it cannot satisfy (#27898). requireExplicitMessageTarget: deliveryRequested && resolvedDelivery.ok, - disableMessageTool: deliveryRequested, + disableMessageTool: deliveryRequested || deliveryPlan.mode === "none", abortSignal, }); },