fix(cron): preserve explicit to on mode override and always include mode in UI patches

- delivery.ts: preserve job-level explicit 'to' when overriding mode
- UI: always include mode in failureAlert patch so users can switch between announce/webhook
This commit is contained in:
Evgeny Zislis
2026-03-02 03:21:21 +02:00
committed by Tak Hoffman
parent b33a57fba9
commit 62f71fa401
2 changed files with 7 additions and 3 deletions

View File

@@ -608,8 +608,8 @@ function buildFailureAlert(form: CronFormState) {
...(cooldownMs !== undefined ? { cooldownMs } : {}),
...(accountId ? { accountId } : {}),
};
// Only include mode if explicitly set to non-default value
if (deliveryMode && deliveryMode !== "announce") {
// Always include mode so users can switch between webhook/announce
if (deliveryMode) {
patch.mode = deliveryMode;
}
return patch;