From b0c33b1526b91bce03251ff7c12b25387cbd3482 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 16 Apr 2019 17:10:58 +0200 Subject: [PATCH] MOBILE-2961 push: Use notification icon in foreground --- src/core/pushnotifications/providers/pushnotifications.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/pushnotifications/providers/pushnotifications.ts b/src/core/pushnotifications/providers/pushnotifications.ts index f155eb8be..28bbc77f8 100644 --- a/src/core/pushnotifications/providers/pushnotifications.ts +++ b/src/core/pushnotifications/providers/pushnotifications.ts @@ -339,6 +339,13 @@ export class CorePushNotificationsProvider { localNotif.text = notification.message; })); + if (this.utils.isTrueOrOne(data.extrafeatures)) { + // Extra features enabled. + localNotif.icon = notification.image; + // This feature isn't supported by the official plugin, we use a fork. + ( localNotif).iconType = data['image-type']; + } + Promise.all(promises).then(() => { this.localNotificationsProvider.schedule(localNotif, CorePushNotificationsProvider.COMPONENT, data.site); });