fix: accept cron delivery thread ids · openclaw/openclaw@3e497f5
steipete
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -54,6 +54,43 @@ describe("cron protocol validators", () => {
|
54 | 54 | expect(validateCronUpdateParams({ jobId: "job-2", patch: { enabled: true } })).toBe(true); |
55 | 55 | }); |
56 | 56 | |
| 57 | +it("accepts delivery threadId on add and update params", () => { |
| 58 | +expect( |
| 59 | +validateCronAddParams({ |
| 60 | + ...minimalAddParams, |
| 61 | +delivery: { |
| 62 | +mode: "announce", |
| 63 | +channel: "telegram", |
| 64 | +to: "-100123", |
| 65 | +threadId: 42, |
| 66 | +}, |
| 67 | +}), |
| 68 | +).toBe(true); |
| 69 | +expect( |
| 70 | +validateCronUpdateParams({ |
| 71 | +id: "job-1", |
| 72 | +patch: { |
| 73 | +delivery: { |
| 74 | +mode: "announce", |
| 75 | +channel: "telegram", |
| 76 | +to: "-100123", |
| 77 | +threadId: "topic-42", |
| 78 | +}, |
| 79 | +}, |
| 80 | +}), |
| 81 | +).toBe(true); |
| 82 | +expect( |
| 83 | +validateCronUpdateParams({ |
| 84 | +id: "job-1", |
| 85 | +patch: { |
| 86 | +delivery: { |
| 87 | +threadId: 42, |
| 88 | +}, |
| 89 | +}, |
| 90 | +}), |
| 91 | +).toBe(true); |
| 92 | +}); |
| 93 | + |
57 | 94 | it("accepts remove params for id and jobId selectors", () => { |
58 | 95 | expect(validateCronRemoveParams({ id: "job-1" })).toBe(true); |
59 | 96 | expect(validateCronRemoveParams({ jobId: "job-2" })).toBe(true); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。