@inngageregistry/inngage-react 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,7 +89,7 @@ export const openRichNotification = (notificationData) => {
89
89
 
90
90
 
91
91
 
92
- export default async ({ appToken, dev, enableAlert }) => {
92
+ export default async ({ appToken, dev, enableAlert, onNotificationOpenedApp }) => {
93
93
  var messageArray = [];
94
94
 
95
95
  firebase.messaging().onNotificationOpenedApp(async (remoteMessage) => {
@@ -97,9 +97,10 @@ export default async ({ appToken, dev, enableAlert }) => {
97
97
  openCommonNotification({ appToken, dev, remoteMessage, enableAlert, state: 'Background' })
98
98
  });
99
99
 
100
- messaging().getInitialNotification(async (remoteMessage) => {
101
- console.log("from quit")
102
- })
100
+ if(typeof onNotificationOpenedApp == 'function') {
101
+ const remoteMessage = await messaging().getInitialNotification();
102
+ onNotificationOpenedApp(remoteMessage);
103
+ }
103
104
 
104
105
  firebase.messaging().onMessage(async (remoteMessage) => {
105
106
  console.log('Push received: Foreground')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inngageregistry/inngage-react",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Inngage react integration",
5
5
  "main": "index.js",
6
6
  "scripts": {