MOBILE-2319 push: Fix pushID of the device

main
Dani Palou 2018-03-20 14:53:25 +01:00
parent d8be7efbc6
commit 8dc255ea20
1 changed files with 2 additions and 2 deletions

View File

@ -326,8 +326,8 @@ export class AddonPushNotificationsProvider {
this.onMessageReceived(notification);
});
pushObject.on('registration').subscribe((registrationId: any) => {
this.pushID = registrationId;
pushObject.on('registration').subscribe((data: any) => {
this.pushID = data.registrationId;
this.registerDeviceOnMoodle().catch((error) => {
this.logger.warn('Can\'t register device', error);
});