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.
This commit is contained in:
Riyadh
2026-05-21 07:01:16 +00:00
parent 965e8eba29
commit c184b7bc9c
+6 -1
View File
@@ -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)