mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:07:40 +00:00
fix: stop hardcoded channel fallback and auto-pick sole configured channel (#23357) (thanks @lbo728)
Co-authored-by: lbo728 <extreme0728@gmail.com>
This commit is contained in:
@@ -59,6 +59,19 @@ describe("agent delivery helpers", () => {
|
||||
expect(resolved.resolvedTo).toBe("+1999");
|
||||
});
|
||||
|
||||
it("does not inject a default deliverable channel when session has none", () => {
|
||||
const plan = resolveAgentDeliveryPlan({
|
||||
sessionEntry: undefined,
|
||||
requestedChannel: "last",
|
||||
explicitTo: undefined,
|
||||
accountId: undefined,
|
||||
wantsDelivery: true,
|
||||
});
|
||||
|
||||
expect(plan.resolvedChannel).toBe("webchat");
|
||||
expect(plan.deliveryTargetMode).toBeUndefined();
|
||||
});
|
||||
|
||||
it("skips outbound target resolution when explicit target validation is disabled", () => {
|
||||
const plan = resolveAgentDeliveryPlan({
|
||||
sessionEntry: {
|
||||
|
||||
Reference in New Issue
Block a user