style: biome format messaging-delivery
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
This commit is contained in:
parent
bf65df8603
commit
60520a1986
@ -163,10 +163,7 @@ function createDeps(overrides: {
|
|||||||
if (where.id && row.id !== where.id) continue;
|
if (where.id && row.id !== where.id) continue;
|
||||||
if (where.providerHandle && row.providerHandle !== where.providerHandle) continue;
|
if (where.providerHandle && row.providerHandle !== where.providerHandle) continue;
|
||||||
if (where.status) {
|
if (where.status) {
|
||||||
const allowed =
|
const allowed = typeof where.status === "string" ? [where.status] : where.status.in;
|
||||||
typeof where.status === "string"
|
|
||||||
? [where.status]
|
|
||||||
: where.status.in;
|
|
||||||
if (!allowed.includes(String(row.status))) continue;
|
if (!allowed.includes(String(row.status))) continue;
|
||||||
}
|
}
|
||||||
Object.assign(row, data);
|
Object.assign(row, data);
|
||||||
|
|||||||
@ -475,7 +475,9 @@ function outboundStatusFromWebhook(event: MessagingOutboundStatus): "failed" | "
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Stored statuses that may transition to the webhook target. */
|
/** Stored statuses that may transition to the webhook target. */
|
||||||
function allowedSourcesForWebhookTarget(target: "failed" | "sent"): Array<"pending" | "sent" | "failed"> {
|
function allowedSourcesForWebhookTarget(
|
||||||
|
target: "failed" | "sent",
|
||||||
|
): Array<"pending" | "sent" | "failed"> {
|
||||||
// Drain claims rows `sent` before the provider acks; a late ERROR must not
|
// Drain claims rows `sent` before the provider acks; a late ERROR must not
|
||||||
// regress a delivered row. Terminal `failed` must not be upgraded by SENT.
|
// regress a delivered row. Terminal `failed` must not be upgraded by SENT.
|
||||||
if (target === "failed") return ["pending"];
|
if (target === "failed") return ["pending"];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user