[Vortex] FCM: Update general payload for new firebase v1 API

Review Request #1089 — Created Jan. 11, 2024 and submitted

b.stoop
Lunr.Vortex
fcm/updatepayload
1088
1116, 1090
f58793b...
lunr

Based on master

FCM: Update general payload for new firebase v1 API

https://firebase.google.com/docs/cloud-messaging/migrate-v1?hl=en&authuser=0#update-the-payload-of-send-requests, The payload needed some updates for this to work with the new firebase API.
Also referenced https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages.

Github Actions run: https://github.com/brianstoop/lunr.vortex/actions/runs/7843990001

  • 0
  • 0
  • 3
  • 3
  • 6
Description From Last Updated
b.stoop
  1. 
      
  2. src/Lunr/Vortex/FCM/FCMDispatcher.php (Diff revision 1)
     
     
     

    This payload object need to be in a message object

  3. 
      
b.stoop
b.stoop
smillernl
  1. 
      
  2. src/Lunr/Vortex/FCM/FCMPayload.php (Diff revision 3)
     
     

    I'm not sure if we should be setting this here, since that is also reported as the default

  3. Let's make it a proper enum too if we rename it

  4. 
      
b.stoop
pprkut
  1. 
      
  2. I'm against introducing platform specific overrides in the first version of the review. They can come in later as separate reviews, but the initial review should just contain the generic stuff.

    Platform specific overrides would need to go into platform specific payloads. We would then move away from fcm-data and fcm-notification to, I guess, fcm-android, fcm-apns and fcm-webpush.

  3. Is there still a difference between data and notification on the client side?

    1. I asked a FE to give some insight to this, i'm not sure why we have the distinction in the frontend/endpoint. The only difference I could find is that these have different uses cases but AFAIK all endpoints can recieve data and notification types

    2. So, from what I understand now is that the data and notification notification are handeld differently by the SDK, so its not platform specific and it has different use cases. In our cases Android mainly uses data notifications and iOS uses notification

  4. src/Lunr/Vortex/FCM/FCMPayload.php (Diff revision 4)
     
     
     
     
     
     
     
     
     
     
     
     

    If you allow a false return, you need to add a test that checks that scenario.

  5. 
      
b.stoop
pprkut
  1. Ship It!
  2. 
      
b.stoop
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (31553fa)
Loading...