fix(agents): keep fallback routes account-bound · openclaw/openclaw@1ed8592
steipete
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,6 +53,20 @@ describe("delivery context helpers", () => {
|
53 | 53 | }); |
54 | 54 | }); |
55 | 55 | |
| 56 | +it("does not inherit route fields from a different account on the same channel", () => { |
| 57 | +const merged = mergeDeliveryContext( |
| 58 | +{ channel: "telegram", accountId: "bot-a" }, |
| 59 | +{ channel: "telegram", to: "123", accountId: "bot-b", threadId: "99" }, |
| 60 | +); |
| 61 | + |
| 62 | +expect(merged).toEqual({ |
| 63 | +channel: "telegram", |
| 64 | +to: undefined, |
| 65 | +accountId: "bot-a", |
| 66 | +}); |
| 67 | +expect(merged?.threadId).toBeUndefined(); |
| 68 | +}); |
| 69 | + |
56 | 70 | it("uses fallback route fields when fallback has no channel", () => { |
57 | 71 | const merged = mergeDeliveryContext( |
58 | 72 | { channel: "demo-channel" }, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。