eclipsesource / tabris-plugin-firebase

A firebase plugin for Tabris.js
https://tabrisjs.com
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

"message" fired redundantly when "launchData" is set #60

Closed cpetrov closed 4 years ago

cpetrov commented 5 years ago

Problem description

The "message" event is fired even when launchData is set due to a cold app launch (app not running and being launched by tapping on a notification banner) on iOS with the same notification data.

Expected behavior

No "message" event should be redundantly fired when launchData has been set due to a cold launch.

Environment

Code snippet

setTimeout(() => { // workaround for #41
  console.log('launchData: ' + JSON.stringify(firebase.Messaging.launchData));
});
firebase.Messaging.on({message: ({data}) => console.log('"message" data: ' + JSON.stringify(data))});
patrykmol commented 4 years ago

Fixed with https://github.com/eclipsesource/tabris-plugin-firebase/commit/29baffa67c5ef817c994600a2d4313a4e63dc098.