-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swap GCM endpoints with FCM #126
Conversation
Fixes geeknam#109 Per deprecation notice at: https://developers.google.com/cloud-messaging/android/android-migrate-fcm#update-server-endpoints
1 similar comment
gcm/gcm.py
Outdated
@@ -13,7 +13,7 @@ | |||
from urllib.parse import unquote | |||
|
|||
|
|||
GCM_URL = 'https://gcm-http.googleapis.com/gcm/send' | |||
GCM_URL = 'https://fcm.googleapis.com/fcm/send/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need the trailing slash. It won't work with the slash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it wasn't tested because I replaced the library in my stack. I was just trying to be helpful to the maintainer. I updated the pull request to remove the trailing slash, but doesn't look like it will be merged any time soon regardless.
Fix trailing slash in untested pull request to unmaintained library
While this will work for the time being, you should probably think about using a new library that will receive support for FCM features going forward. See https://github.com/olucurious/PyFCM or https://github.com/firebase/firebase-admin-python |
If you want to fork this library and shim it to avoid server refactoring, go for it but I'd hesitate to push these changes upstream since the library is called "python-gcm". |
Good note, this library should probably die on the vine. This only buys some time after the endpoint is removed next week. I imagine firebase-admin will be the better maintained Python library going forward short of just using the new HTTP API directly. |
Fixes #109
Per deprecation notice at: https://developers.google.com/cloud-messaging/android/android-migrate-fcm#update-server-endpoints