Skip to content

feat: support FCM installation ID alongside old token - #655

Draft
boringcactus wants to merge 3 commits into
mainfrom
mth-tvyzwlusxpus
Draft

feat: support FCM installation ID alongside old token#655
boringcactus wants to merge 3 commits into
mainfrom
mth-tvyzwlusxpus

Conversation

@boringcactus

@boringcactus boringcactus commented Jul 31, 2026

Copy link
Copy Markdown
Member

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.

@boringcactus
boringcactus requested a review from a team as a code owner July 31, 2026 19:43
@boringcactus
boringcactus requested review from KaylaBrady and removed request for a team July 31, 2026 19:43
Comment thread lib/util/fcm_target.ex
@@ -0,0 +1,37 @@
defmodule Util.FCMTarget do

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 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} ->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@boringcactus boringcactus added the deploy to dev-orange Automatically deploy this PR to dev-orange label Aug 3, 2026
@boringcactus boringcactus removed the deploy to dev-orange Automatically deploy this PR to dev-orange label Aug 3, 2026
@boringcactus boringcactus added the deploy to dev-orange Automatically deploy this PR to dev-orange label Aug 6, 2026
@boringcactus
boringcactus marked this pull request as draft August 6, 2026 19:58
@boringcactus

Copy link
Copy Markdown
Member Author

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.

@boringcactus boringcactus removed the deploy to dev-orange Automatically deploy this PR to dev-orange label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants