From 26f8e45db6c632cc66a3925332aa613c25c02053 Mon Sep 17 00:00:00 2001 From: riyadhafraa <49757212-riyadhafraa@users.noreply.replit.com> 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. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: fc796524-4846-43f8-869a-fe4775e6b171 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/qrzw3bH Replit-Helium-Checkpoint-Created: true --- 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)