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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user