From 9f4bb4b571d9c640ca236027c4a3c42b251ccc96 Mon Sep 17 00:00:00 2001 From: Maxim Belov Date: Fri, 19 Apr 2024 14:37:45 +0300 Subject: [PATCH 1/2] add onBackgroundPushReceived --- src/@awesome-cordova-plugins/plugins/airship/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/@awesome-cordova-plugins/plugins/airship/index.ts b/src/@awesome-cordova-plugins/plugins/airship/index.ts index 84d1933fe5..8caadbcec2 100644 --- a/src/@awesome-cordova-plugins/plugins/airship/index.ts +++ b/src/@awesome-cordova-plugins/plugins/airship/index.ts @@ -1106,6 +1106,13 @@ class AirshipPush { return this.listenerToObservable('onPushReceived'); } + /** + * Background push received listener. + */ + onBackgroundPushReceived(): Observable { + return this.listenerToObservable('onBackgroundPushReceived'); + } + /** * Notification response listener. */ From b6c0039fa15ba4f58570018cfbb2824f46f0910c Mon Sep 17 00:00:00 2001 From: Maxim Belov Date: Sat, 20 Apr 2024 09:36:46 +0300 Subject: [PATCH 2/2] add isForeground to PushReceivedEvent --- src/@awesome-cordova-plugins/plugins/airship/index.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/@awesome-cordova-plugins/plugins/airship/index.ts b/src/@awesome-cordova-plugins/plugins/airship/index.ts index 8caadbcec2..c4019d3fdf 100644 --- a/src/@awesome-cordova-plugins/plugins/airship/index.ts +++ b/src/@awesome-cordova-plugins/plugins/airship/index.ts @@ -116,6 +116,7 @@ export interface PushTokenReceivedEvent { */ export interface PushReceivedEvent { pushPayload: PushPayload; + isForeground: boolean; } /** @@ -1106,13 +1107,6 @@ class AirshipPush { return this.listenerToObservable('onPushReceived'); } - /** - * Background push received listener. - */ - onBackgroundPushReceived(): Observable { - return this.listenerToObservable('onBackgroundPushReceived'); - } - /** * Notification response listener. */