-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[keyserver] Replace deprecated sendToDevice firebase-admin method
Summary: This method is deprecated and is now completely failing all requests. This diff resolves [ENG-235](https://linear.app/comm/issue/ENG-235/update-fcm-code-to-not-use-legacy-methods). Test Plan: I set up a test environment on my personal server. It's running the latest keyserver release (115). In this environment, I created a [test script](https://linear.app/comm/issue/ENG-9323/android-notifications-are-completely-broken#comment-516bbedd) to generate some notifs by sending messages from commbot to a test account. I confirmed that the test account received a notif on an Android device it's logged into. I also did some testing to make sure the error handling logic worked correctly. In my test environment, I set the device token to `fake` and checked what the error response looked like, and made sure that `error.errorInfo.code` contained the error code. For my fake device token, the error code ended up being `messaging/invalid-argument`, but I'm pretty sure that the error code would appear in the same place for the types of errors we care about (`fcmTokenInvalidationErrors`). Reviewers: varun, will Reviewed By: varun, will Subscribers: marcin, kamil, tomek Differential Revision: https://phab.comm.dev/D13368
- Loading branch information
Showing
4 changed files
with
370 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.