MOBILE-3039 push: Fix appurl from push notifs in iOS

main
Dani Palou 2019-05-30 12:20:07 +02:00
parent 3eb0c81c46
commit 1ab8154428
1 changed files with 5 additions and 0 deletions

View File

@ -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()) {