From 1ab815442822aabfb261ce59aa7ace9c3e494bb7 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 30 May 2019 12:20:07 +0200 Subject: [PATCH] MOBILE-3039 push: Fix appurl from push notifs in iOS --- src/core/pushnotifications/providers/pushnotifications.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/pushnotifications/providers/pushnotifications.ts b/src/core/pushnotifications/providers/pushnotifications.ts index 430d78000..992a311be 100644 --- a/src/core/pushnotifications/providers/pushnotifications.ts +++ b/src/core/pushnotifications/providers/pushnotifications.ts @@ -403,6 +403,11 @@ export class CorePushNotificationsProvider { const data = notification ? notification.additionalData : {}; this.sitesProvider.getSite(data.site).then(() => { + + if (typeof data.customdata == 'string') { + data.customdata = this.textUtils.parseJSON(data.customdata, {}); + } + if (this.utils.isTrueOrOne(data.foreground)) { // If the app is in foreground when the notification is received, it's not shown. Let's show it ourselves. if (this.localNotificationsProvider.isAvailable()) {