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
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