-
Notifications
You must be signed in to change notification settings - Fork 205
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
Node GCM doesn't support Apple 'apns-collapse-id' or Android 'collapseKey' #313
Comments
Hi @jbruggeman, The solution would be for |
So, looking into it a bit further, google now has two versions of the API. node-gcm looks like it covers the legacy API, but not the new API, which hits a different endpoint. This new API was released within the last month. Do you think it makes sense to update node-gcm to handle a separate endpoint or perhaps a new wrapper library should be created? |
Hi @jbruggeman, It would probably make sense to update node-gcm as long as there are no breaking changes. |
The new API is described here: The old API is listed as 'Legacy HTTP Server Protocol'. |
Hi @jbruggeman, Regarding collapse keys, I think that updating @hypesystem fyi |
I'm not quite sure I understand this correctly. If it is true that there is no new functionality added (that there is no functionality current unsupported by node-gcm), I agree: we don't need to focus on a new version now. If you are up for giving it a try, @jbruggeman, it might be cool to see how much would need to change in order to support the new API. I'm assuming that using the new API would still work for old applications, registering with the existing methods on the client side. |
@eladnava @hypesystem Yes, it has a collapseKey, but it will not generate the APNS apns-collapse-id in the resulting message, which is required for collapsing on iOS 10+. Adding this key is only available using the FCM HTTP v1 API. So yes, there is new functionality added. I did build a simple implementation wrapping the new API. I used the 'googleapis' package to do token management, and constructed the message according to the spec, and built a simple message queue to do message management. I'll see what I can do about packaging it up into a releasable package. |
@jbruggeman Cool, if there is indeed missing functionality we may be forced to update to the new API sooner than later. Is there any information on the Internet that references the fact that the old Legacy HTTP API does not set the |
A source for this would indeed be good, so we can document this current deficiency. @jbruggeman do you have a subjective opinion on how much has changed between the API we use and the new one? I haven't had time to check it out, but it might be relevant to update what we do under the hood. |
Google has added 'apns-collapse-id' and 'collapseKey'. If you're using a non-legacy application it appears iOS 10+ devices will not be able to collapse notifications together.
See https://firebase.google.com/docs/cloud-messaging/concept-options
The text was updated successfully, but these errors were encountered: