MOBILE-4123 cordova: Update push plugin to 4.0.0-moodle.2
parent
9aa70c8c21
commit
e968e988e8
|
@ -5298,9 +5298,9 @@
|
|||
"integrity": "sha512-QD5S6bsm6awJrNMb8YN/vkYghKAMfZMHccdimx6s1i5S9fgZUSf7L477NJqjFu62imVZYJIJuavBbw5fR/562w=="
|
||||
},
|
||||
"@moodlehq/phonegap-plugin-push": {
|
||||
"version": "4.0.0-moodle.1",
|
||||
"resolved": "https://registry.npmjs.org/@moodlehq/phonegap-plugin-push/-/phonegap-plugin-push-4.0.0-moodle.1.tgz",
|
||||
"integrity": "sha512-gSP7qjeOGnwuzXqrxgT7fJS4udSYFYm56GHRGKvYM0A3V73D6VCcDokDniixBdz2w12c/K0MyiBZdjgbVmHtOw=="
|
||||
"version": "4.0.0-moodle.2",
|
||||
"resolved": "https://registry.npmjs.org/@moodlehq/phonegap-plugin-push/-/phonegap-plugin-push-4.0.0-moodle.2.tgz",
|
||||
"integrity": "sha512-kxHnpCzM7VMw5XUrLeZX03bLkQzA3j//+4nq7MiZbLoliPsQRAxGqyZ9HmbLcPsvlt1h7NM1eSVG52qZ7D3PlQ=="
|
||||
},
|
||||
"@mrmlnc/readdir-enhanced": {
|
||||
"version": "2.2.1",
|
||||
|
@ -11355,8 +11355,7 @@
|
|||
"balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
},
|
||||
"base": {
|
||||
"version": "0.11.2",
|
||||
|
@ -11677,7 +11676,6 @@
|
|||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -13341,8 +13339,7 @@
|
|||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||
},
|
||||
"concat-stream": {
|
||||
"version": "1.6.2",
|
||||
|
@ -18286,8 +18283,19 @@
|
|||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"glob-base": {
|
||||
|
@ -19921,7 +19929,20 @@
|
|||
"ignore-walk": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
|
||||
"integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw=="
|
||||
"integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
|
||||
"requires": {
|
||||
"minimatch": "^3.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"image-size": {
|
||||
"version": "0.5.5",
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
"@moodlehq/cordova-plugin-local-notification": "0.9.0-moodle.4",
|
||||
"@moodlehq/cordova-plugin-qrscanner": "3.0.1-moodle.4",
|
||||
"@moodlehq/cordova-plugin-zip": "3.1.0-moodle.1",
|
||||
"@moodlehq/phonegap-plugin-push": "4.0.0-moodle.1",
|
||||
"@moodlehq/phonegap-plugin-push": "4.0.0-moodle.2",
|
||||
"@ngx-translate/core": "^13.0.0",
|
||||
"@ngx-translate/http-loader": "^6.0.0",
|
||||
"@types/chart.js": "^2.9.31",
|
||||
|
|
|
@ -667,9 +667,14 @@ export class CorePushNotificationsProvider {
|
|||
|
||||
const pushObject = Push.init(options);
|
||||
|
||||
pushObject.on('notification').subscribe((notification: NotificationEventResponse) => {
|
||||
pushObject.on('notification').subscribe((notification: NotificationEventResponse | {registrationType: string}) => {
|
||||
// Execute the callback in the Angular zone, so change detection doesn't stop working.
|
||||
NgZone.run(() => {
|
||||
if ('registrationType' in notification) {
|
||||
// Not a valid notification, ignore.
|
||||
return;
|
||||
}
|
||||
|
||||
this.logger.log('Received a notification', notification);
|
||||
this.onMessageReceived(notification);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue