pusher / push-notifications-android

Android SDK for Pusher Beams
https://www.pusher.com/beams
MIT License
21 stars 22 forks source link

Work around missing instance id migration for reporting #98

Closed marekoid closed 4 years ago

marekoid commented 4 years ago

This is based off #97:

We had a customer report a fatal issue where their notification bundle did not provide an instanceid. If we don't receive an instanceid we should not crash, we should log an error, and not report the notification.

marekoid commented 4 years ago

Hey @luismfonseca please check this PR that we have paired with @daniellevass to create as an alternative to #97. It's the safest and minimal set changes (on which we're on the same page) to work around the missing migration for very unlikely cases of some reporting jobs being still pending.

The changes here do not compromise the design of any of the existing code (e.g. the fromBundle function still needs to return an object, not null).

The changes are passing the tests (can be checked in this branch), however as their ROI is questionable let's not check them in.