From c184b7bc9c56281ef81b655fe4b4a1697f3c3824 Mon Sep 17 00:00:00 2001 From: Riyadh Date: Thu, 21 May 2026 07:01:16 +0000 Subject: [PATCH] Ensure timely delivery of notifications to iOS devices Add `urgency: "high"` to the push notification payload in `push.ts` to prioritize delivery for iOS PWA users. --- artifacts/api-server/src/lib/push.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/artifacts/api-server/src/lib/push.ts b/artifacts/api-server/src/lib/push.ts index b0e21350..91fc6c39 100644 --- a/artifacts/api-server/src/lib/push.ts +++ b/artifacts/api-server/src/lib/push.ts @@ -322,7 +322,12 @@ export async function sendPushToUser( keys: { p256dh: sub.p256dh, auth: sub.auth }, }, json, - { TTL: 60 }, + // iOS PWA receives Web Push through APNs and will *silently + // delay* or coalesce notifications unless we mark them as + // `urgency: 'high'`. Without this, an order/meeting alert + // can land minutes after the event with no sound. TTL stays + // short — a 60-second-old "new order" ping is useless. + { TTL: 60, urgency: "high" }, ); await db .update(pushSubscriptionsTable)