Skip to content

feat(fcm): Enable fid and deprecate token for Send API#3145

Open
yvonnep165 wants to merge 11 commits into
mainfrom
yp-add-fid-arg
Open

feat(fcm): Enable fid and deprecate token for Send API#3145
yvonnep165 wants to merge 11 commits into
mainfrom
yp-add-fid-arg

Conversation

@yvonnep165
Copy link
Copy Markdown

@yvonnep165 yvonnep165 commented May 13, 2026

This change deprecates TokenMessage interface, transitioning support to FidMessage interface. A new FidMulticastMessage interface containing only fids: string[] is added. An optional fids is added to the legacy MulticastMessage interface, which is deprecated, to support mixed transition batches.

The multicast helper function sendEachForMulticast is updated to support both target types concurrently up to a combined total of 500. And function overloads are implemented on sendEachForMulticast to 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-link error) . So I change it to plain comment text.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/messaging/messaging-api.ts
Comment thread src/messaging/messaging-api.ts
Comment thread src/messaging/messaging.ts Outdated
Comment thread src/messaging/messaging.ts Outdated
@yvonnep165 yvonnep165 added release-note release:stage Stage a release candidate labels May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:stage Stage a release candidate release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant