Skip to content

Commit

Permalink
Move setting of useFcmOrGcmMethod to setOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-friedl committed Jun 19, 2024
1 parent f6724d1 commit cf87412
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/push-notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ import {
class PN {
constructor(options) {
this.setOptions(options);
this.useFcmOrGcmMethod = this.settings.isLegacyGCM
? GCM_METHOD
: FCM_METHOD;
}

setOptions(opts) {
Expand All @@ -32,6 +29,9 @@ class PN {
this.apn.shutdown();
}
this.apn = new APN(this.settings.apn);
this.useFcmOrGcmMethod = this.settings.isLegacyGCM
? GCM_METHOD
: FCM_METHOD;
}

sendWith(method, regIds, data, cb) {
Expand Down

0 comments on commit cf87412

Please sign in to comment.