pusher / push-notifications-web

Beams Browser notifications
MIT License
39 stars 19 forks source link

Fix bug where analytics would cause exceptions when used with onNotificationReceived #66

Closed jonathanlloyd closed 4 years ago

jonathanlloyd commented 4 years ago

We were previously passing the overriden payload object directly to the click handler if the customer called onNotificationReceived. This is problematic because the custom payload has been stripped of pusher metadata, which the click handler relies on for analytics events.

This PR embeds the metadata in a separate object so that it is always accessible.