Skip to content

Commit

Permalink
fix(apns): use when specified
Browse files Browse the repository at this point in the history
  • Loading branch information
jef committed Mar 18, 2021
1 parent 10f7e0c commit 99a274d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/notification/apns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ export function sendApns(link: Link, store: Store) {
production: apns.apnsProduction,
};

if (
options.token.key.length <= 0 ||
options.token.keyId.length <= 0 ||
options.token.teamId.length <= 0
) {
return;
}

const apnProvider = new apn.Provider(options);

const note = new apn.Notification();
Expand Down

0 comments on commit 99a274d

Please sign in to comment.