Hi! We’ve installed a dockerized version of Rocket.chat, and forked the React Native app.
Last week, push notifications suddenly stopped working, until we found Google definitively deleted all GCM endpoints, forcing you to move to FCM.
First thought the React Native app needed update, but after talking with some guys at the community, they said Firebase Cloud Messaging was already implemented on March/19.
We configured the server to point to Firebase URL, but on the log, it returned errors (404).
So… what was happening? Until we found something suspicious: The URL where the push was sent, built on server / lib / cordova.js > sendPush method had a “hardcoded” format, after the URL you define:
98: return HTTP.post(${ settings.get('Push_gateway') }/push/${ service }/send
, data, function(error, response) {
(after your configured URL it adds /push/${service}/send)
But FCM says your URL should be in the following format:
https://fcm.googleapis.com/fcm/send
After changing that line on my server, notifications started working!
So my question is (because I see the file on git hasn’t been changed, and no one is complaining about this): What did I do wrong in my RC config, that my only option was to “touch code”? (obviously that wasn’t my idea!).
Thanks a lot!!!