Skip to content

Commit

Permalink
Fixes incorrect keys for new push notification package (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
pushchris authored Jul 25, 2024
1 parent 4361767 commit fcdd165
Show file tree
Hide file tree
Showing 2 changed files with 1,094 additions and 47 deletions.
10 changes: 9 additions & 1 deletion apps/platform/src/providers/push/LocalPushProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export default class LocalPushProvider extends PushProvider {
privateKey: {
type: 'string',
title: 'Private Key',
minLength: 80,
},
clientEmail: {
type: 'string',
Expand All @@ -121,7 +122,14 @@ export default class LocalPushProvider extends PushProvider {
boot() {
this.transport = new PushNotifications({
apn: this.apn,
fcm: this.fcm,
fcm: {
appName: this.fcm?.appName,
serviceAccountKey: {
projectId: this.fcm?.serviceAccountKey.projectId,
privateKey: this.fcm?.serviceAccountKey.privateKey?.replace(/\\n/g, '\n'),
clientEmail: this.fcm?.serviceAccountKey.clientEmail,
},
},
} as unknown as PushNotifications.Settings) // Types are not up to date
}

Expand Down
Loading

0 comments on commit fcdd165

Please sign in to comment.