ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

Function expects Array not Object #154

Closed gunar closed 8 years ago

gunar commented 8 years ago

I believe this is what you guys intended, otherwise the Example Application spits No RegistrationIds given!.

sender.js:126

  if (!registrationIds.length)

In Javascript Objects don't have lengths.

hypesystem commented 8 years ago

This changed in recent PR #153 that has not yet been released. The README represents how it should be used as per #153.

If you want to use the most recent code (master branch) you can add the dependency with GitHub url in package.json:

"dependencies": {
    //...
    "node-gcm": "ToothlessGear/node-gcm"
}

...but I would recommend just waiting until the next release is out.

For future reference: if you use the README on npmjs.org it will be in sync with the latest release. Here you will see the examples as you expect: https://www.npmjs.com/package/node-gcm

gunar commented 8 years ago

I see. Thanks for the explanation and sorry for any inconvenience. Keep up with the good work! :smile:

hypesystem commented 8 years ago

Thanks for your time and please do not hesitate to bring anything you see as an issues to our attention in the future :-)