feat(fcm): Enable fid and deprecate token for Send API#3145
Open
yvonnep165 wants to merge 11 commits into
Open
feat(fcm): Enable fid and deprecate token for Send API#3145yvonnep165 wants to merge 11 commits into
fid and deprecate token for Send API#3145yvonnep165 wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for Firebase Installation IDs (FIDs) in the messaging service by adding the FidMessage interface and updating the Message union type. The MulticastMessage interface now supports targeting via fids, and the tokens field has been deprecated and made optional. Feedback includes suggestions to add documentation for the new FidMessage interface, refactor the message construction logic using object destructuring for better maintainability, and improve the grammar of validation error messages. Additionally, the reviewer noted that making tokens optional is a breaking change for TypeScript consumers that should be highlighted in release notes.
…or the messages array construction in MulticastMessage
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change deprecates
TokenMessageinterface, transitioning support toFidMessageinterface. A newFidMulticastMessageinterface containing only fids: string[] is added. An optionalfidsis added to the legacyMulticastMessageinterface, which is deprecated, to support mixed transition batches.The multicast helper function
sendEachForMulticastis updated to support both target types concurrently up to a combined total of 500. And function overloads are implemented onsendEachForMulticastto support both tokens and fids payloads.Note for API doc: Hyper-reference link {@link Messaging.sendEachForMulticast} doesn't work in api extraction since there are distinct method declarations due to function overloads. (throwing an
ae-unresolved-linkerror) . So I change it to plain comment text.