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); });