Server: FCM HTTP v1 target in fid instead of deprecated token (D-083 follow-up)

The stored fcm_token is the Firebase Installation ID; HTTP v1 deprecates
message.token (accepted only during the transition) in favour of message.fid.
Push examples and push_fcm tests follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
2026-10-18 15:16:09 +02:00
parent a3127586ca
commit f56dcbe5f7
10 changed files with 15 additions and 12 deletions
+3 -1
View File
@@ -113,10 +113,12 @@ pub fn entity_type_of(push_type: PushType) -> &'static str {
}
/// The HTTP v1 request body for one device (SPEC §14.6): data only, every value a string, ids only (AC-13.8).
/// The target is `fid`: the stored `fcm_token` is the Firebase Installation ID the phone registered (D-083), and
/// HTTP v1 deprecates `token` in favour of `fid` (D-096).
pub fn message_body(fcm_token: &str, message: &PushMessage) -> Value {
json!({
"message": {
"token": fcm_token,
"fid": fcm_token,
"android": { "priority": "high", "ttl": MESSAGE_TTL },
"data": {
"v": PAYLOAD_VERSION,