From 8dc255ea2076769343244a80b14656fd113cec60 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 20 Mar 2018 14:53:25 +0100 Subject: [PATCH] MOBILE-2319 push: Fix pushID of the device --- src/addon/pushnotifications/providers/pushnotifications.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/addon/pushnotifications/providers/pushnotifications.ts b/src/addon/pushnotifications/providers/pushnotifications.ts index 9482de788..9922269bb 100644 --- a/src/addon/pushnotifications/providers/pushnotifications.ts +++ b/src/addon/pushnotifications/providers/pushnotifications.ts @@ -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); });