Skip to content
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

Fix for GCM Push for 2.2.0+ #1151

Closed
abdox2 opened this issue Mar 23, 2016 · 3 comments
Closed

Fix for GCM Push for 2.2.0+ #1151

abdox2 opened this issue Mar 23, 2016 · 3 comments

Comments

@abdox2
Copy link

abdox2 commented Mar 23, 2016

The GCM Push notification was working fine in 1.6.0, so i was wondering why?? i looked for the difference in the file GCM.js between 1.6.0 and the latest 2.2.1, i fin out that the push_id a random string in the function generateGCMPayload is not sended, so i added it and everthing is working again.

before :

function generateGCMPayload(coreData, timeStamp, expirationTime) {
var payloadData = {
'time': new Date(timeStamp).toISOString(),
'data': JSON.stringify(coreData)
};
...
}
after:

function generateGCMPayload(coreData, timeStamp, expirationTime) {
var pushId = cryptoUtils.newObjectId();
var payloadData = {
'time': new Date(timeStamp).toISOString(),
'push_id': pushId,
'data': JSON.stringify(coreData)
};
...
}

Thank you to look in to it

@flovilmart
Copy link
Contributor

OK, I'll added back as I thought it was conflicting with the _PushStatus objectID

@wangmengyan95
Copy link
Contributor

Fixes in #1168

@abdox2
Copy link
Author

abdox2 commented Mar 24, 2016

Thank you all. i love this project :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants