You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/APNS.js
+23-19Lines changed: 23 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ export class APNS {
21
21
* @param {String} args.passphrase The passphrase for the provider key, if required
22
22
* @param {Boolean} args.production Specifies which environment to connect to: Production (if true) or Sandbox
23
23
* @param {String} args.topic Specififies an App-Id for this Provider
24
+
* @param {String} args.bundleId DEPRECATED: Specifies an App-ID for this Provider
24
25
* @param {Number} args.connectionRetryLimit The maximum number of connection failures that will be tolerated before apn.Provider will "give up". (Defaults to: 3)
25
26
*/
26
27
constructor(args=[]){
@@ -42,10 +43,11 @@ export class APNS {
42
43
43
44
// rewrite bundleId to topic for backward-compatibility
44
45
if(apnsArgs.bundleId){
46
+
log.warn(LOG_PREFIX,'bundleId is deprecated, use topic instead');
45
47
apnsArgs.topic=apnsArgs.bundleId
46
48
}
47
49
48
-
letprovider=this._createProvider(apnsArgs);
50
+
letprovider=APNS._createProvider(apnsArgs);
49
51
this.providers.push(provider);
50
52
}
51
53
@@ -62,9 +64,9 @@ export class APNS {
62
64
63
65
/**
64
66
* Send apns request.
65
-
*
67
+
*
66
68
* @param {Object} data The data we need to send, the format is the same with api request body
67
-
* @param {Array} devices An array of devices
69
+
* @param {Array} allDevices An array of devices
68
70
* @returns {Object} A promise which is resolved immediately
0 commit comments