BlueBubblesApp / bluebubbles-server

Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
https://bluebubbles.app
Apache License 2.0
540 stars 47 forks source link

FCM API Deprecations #544

Closed dodgepong closed 1 year ago

dodgepong commented 1 year ago

As of June 2023, several Firebase Cloud Messaging APIs are being deprecated, including the batch send API. Full FAQ: https://firebase.google.com/support/faq#fcm-23-deprecation

It would appear that BlueBubbles Server will need to update to 11.7.0 of the firebase-admin package and start using the HTTP v1 API instead of the batch send API before June 20th, 2024 in order to maintain functionality.

zlshames commented 1 year ago

We use sendMulticast: https://github.com/BlueBubblesApp/bluebubbles-server/blob/development/packages/server/src/server/services/fcmService/index.ts#L311

Which, according to this doc, will be deprecated: https://github.com/BlueBubblesApp/bluebubbles-server/blob/development/packages/server/src/server/services/fcmService/index.ts#L311

I'll update it to move away from sendMulticast ASAP.

zlshames commented 1 year ago

I think all I need to do is replace the function call with: https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.messaging.md#messagingsendeachformulticast

sendEachForMulticast. They have the same parameters and response type... so should be super straight forward.

zlshames commented 1 year ago

done. closing