mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 18:51:12 +00:00
fix(routing): preserve explicit cron account and bound message defaults
Co-authored-by: lbo728 <72309817+lbo728@users.noreply.github.com> Co-authored-by: stakeswky <64798754+stakeswky@users.noreply.github.com>
This commit is contained in:
@@ -54,4 +54,22 @@ describe("resolveCronDeliveryPlan", () => {
|
||||
expect(plan.channel).toBeUndefined();
|
||||
expect(plan.to).toBe("https://example.invalid/cron");
|
||||
});
|
||||
|
||||
it("threads delivery.accountId when explicitly configured", () => {
|
||||
const plan = resolveCronDeliveryPlan(
|
||||
makeJob({
|
||||
delivery: {
|
||||
mode: "announce",
|
||||
channel: "telegram",
|
||||
to: "123",
|
||||
accountId: " bot-a ",
|
||||
},
|
||||
}),
|
||||
);
|
||||
expect(plan.mode).toBe("announce");
|
||||
expect(plan.requested).toBe(true);
|
||||
expect(plan.channel).toBe("telegram");
|
||||
expect(plan.to).toBe("123");
|
||||
expect(plan.accountId).toBe("bot-a");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user