Repository navigation
Conversation
semion11
force-pushed
the
fcm-fid-support
branch
from
October 15, 2026 14:06
093a1ab to
5477d05
Compare
semion11
force-pushed
the
fcm-fid-support
branch
from
October 15, 2026 15:12
5477d05 to
db009f2
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open findings
What changed in this PR
Adds support for sending Firebase Installation IDs (FIDs) to FCM HTTP v1 by introducing an explicit flag that switches the outbound message field from token to fid.
Changes:
- Add
device_token_is_fidattribute (persisted in AR + supported in Redis client) to distinguish FID vs registration token. - Update FCM notification JSON generation to send
fidwhen the flag is set, otherwisetoken. - Add unit/functional specs and README docs covering FID behavior and validation.
| File | Description |
|---|---|
| spec/unit/client/shared/fcm/notification.rb | Adds unit tests for device_token_is_fid serialization, validation, and as_json field selection. |
| spec/functional/fcm_spec.rb | Adds functional test ensuring outbound HTTP uses fid (and not token) when configured. |
| lib/rpush/client/active_model/fcm/notification.rb | Implements fid vs token switching and adds validation when marked as FID. |
| lib/rpush/client/redis/notification.rb | Adds Redis-backed attribute device_token_is_fid with default false. |
| lib/generators/templates/rpush_9_3_0_updates.rb | Introduces migration to persist device_token_is_fid on notifications table. |
| lib/generators/rpush_migration_generator.rb | Ensures the new migration template is included in generator output. |
| spec/support/active_record_setup.rb | Updates spec DB migration setup to include the new migration. |
| README.md | Documents how to send FIDs via device_token_is_fid. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
FCM HTTP v1 deprecated Message.token and added Message.fid for Firebase Installation IDs. New Android SDKs give apps an FID instead of a registration token, but Rpush could only send token. An FID has 22 characters and a registration token is much longer, so the device_token length tells them apart. Google's SDK does this exact check: return token.length() <= 22; (firebase-messaging Store.java, firebase/firebase-android-sdk#8087).
semion11
force-pushed
the
fcm-fid-support
branch
from
October 15, 2026 16:15
db009f2 to
9b47c46
Compare
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.

FCM HTTP v1 deprecated Message.token and added Message.fid for
Firebase Installation IDs. New Android SDKs give apps an FID instead
of a registration token, but Rpush could only send token.
An FID has 22 characters and a registration token is much longer, so
the device_token length tells them apart. Google's SDK does this exact
check: return token.length() <= 22; (firebase-messaging Store.java,
firebase/firebase-android-sdk#8087).