mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 04:17:42 +00:00
fix(cron): preserve telegram announce target + delivery truth
This commit is contained in:
@@ -278,6 +278,26 @@ describe("gateway agent handler", () => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
it("respects explicit bestEffortDeliver=false for main session runs", async () => {
|
||||
primeMainAgentRun();
|
||||
|
||||
await invokeAgent(
|
||||
{
|
||||
message: "strict delivery",
|
||||
agentId: "main",
|
||||
sessionKey: "agent:main:main",
|
||||
deliver: true,
|
||||
bestEffortDeliver: false,
|
||||
idempotencyKey: "test-strict-delivery",
|
||||
},
|
||||
{ reqId: "strict-1" },
|
||||
);
|
||||
|
||||
await vi.waitFor(() => expect(mocks.agentCommand).toHaveBeenCalled());
|
||||
const callArgs = mocks.agentCommand.mock.calls.at(-1)?.[0] as Record<string, unknown>;
|
||||
expect(callArgs.bestEffortDeliver).toBe(false);
|
||||
});
|
||||
|
||||
it("handles missing cliSessionIds gracefully", async () => {
|
||||
mockMainSessionEntry({});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user