[Vortex] FCM: Add android payload for new firebase v1 API

Review Request #1116 — Created Feb. 9, 2024 and submitted

b.stoop
Lunr.Vortex
fcm/androidpayload
1089
1640aba...
lunr

Based on master

FCM: Add android payload for new firebase v1 API

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

  • 0
  • 0
  • 3
  • 2
  • 5
Description From Last Updated
b.stoop
smillernl
  1. 
      
  2. Can you make it array<string,mixed>

  3. Are there other options than s?

    1. Not that I can find: https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidconfig

    2. Additional comment. No need to cast a string to a string.

  4. Why not ask for the enum value directly?

  5. Should we warn if this is invalid?

    1. Not necessary if we only allow the enum values

    2. But we don't, we allow any string

    3. Not anymore :)

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

    Why do this here and not in the set_android_payload?

    1. If we do that directly in the set_android_payload you want be able to edit the android payload. I set it up that if you set the android payload you get that payload back if you call get_android_payload to edit it for example

    2. Isn't the idea that you edit it before?

    3. Yes, but what if you want to edit the android payload on two different places in the code, like we do in our project specific code and in Stellr?

    4. Do we have a getter for the android payload? Because otherwise I don't see a flow where it could happen that you set the payload twice.

    5. Yes, I made the get_android_payload method above the set_android_payload at the end of this file

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

Status: Closed (submitted)

Change Summary:

Pushed to master (d625ee4)
Loading...