feat(server): deliver push without a Firebase project
Every notification depended on Firebase Cloud Messaging, so a missing Firebase project, which is the current state, meant no notification could be delivered on any platform. Web Push and token-based Apple Push are now first class transports alongside FCM, chosen per registered device, and a scheduled Cloudflare Worker drain retries an outbox so a provider outage delays rather than drops a message.
This commit is contained in:
parent
5aa268970a
commit
bb0e54dcee
13 changed files with 1412 additions and 41 deletions
|
|
@ -158,7 +158,7 @@ function androidDelivery(eventType: PushEventType, resourceId: string): {
|
|||
}
|
||||
}
|
||||
|
||||
function validateOutboundData(data: Record<string, string>): {
|
||||
export function validateOutboundData(data: Record<string, string>): {
|
||||
eventType: PushEventType
|
||||
resourceId: string
|
||||
} {
|
||||
|
|
@ -475,7 +475,7 @@ export async function sendFcmMessage(
|
|||
}
|
||||
|
||||
export function providerIsSupported(provider: PushProvider): boolean {
|
||||
return provider === 'fcm'
|
||||
return provider === 'fcm' || provider === 'webpush' || provider === 'apns'
|
||||
}
|
||||
|
||||
async function credentialsEqual(presented: string, expected: string): Promise<boolean> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue