feat: support FCM installation ID alongside old token - #655
Conversation
| @@ -0,0 +1,37 @@ | |||
| defmodule Util.FCMTarget do | |||
There was a problem hiding this comment.
👍 I like this approach
| %User{fcm_installation_id: installation_id} when not is_nil(installation_id) -> | ||
| {installation_id, nil} | ||
|
|
||
| %User{fcm_installation_id: nil, fcm_token: token} -> |
There was a problem hiding this comment.
question(non-blocking): Do we ~always have to support this path since users may not upgrade their app? Or is there a point where the old token just won't work anymore, and users might stop getting notifications without knowing why?
There was a problem hiding this comment.
One day, Google will probably shut off the old notification delivery path, and our users on old versions of the app will stop getting notifications. That will probably not happen anytime soon (even Google probably won’t do it in less than a year), and we should have plenty of notice ahead of time, so we could probably send out a targeted “please upgrade your app, you are on an old version and notifications will break soon” notification if we needed to.
|
Things are busted; this is likely to be a frontend issue rather than a backend issue, but it’s hard to know, and it’s bad to guess. |
Summary
Ticket: Move from Firebase tokens to installation IDs
This seems like the most reasonable way to handle both kinds of target. Pairs with mbta/mobile_app#1911.
Testing
Added and updated unit tests to ensure functionality with both kinds of target. End-to-end delivery test still needs to be done.