urbanairship / ruby-library

A Ruby wrapper for the Urban Airship API.
Other
200 stars 118 forks source link

Update README.markdown #30

Closed rromanchuk closed 11 years ago

rromanchuk commented 11 years ago

minor fix, urbanairship is picky about the format of the alias field

schoblaska commented 11 years ago

Really? That's surprising. Can you show me where in the docs that's specified, or show me some example requests that illustrate the difference? The only docs I could find seem to indicate that the format currently used in the README is correct: https://docs.urbanairship.com/display/DOCS/Server%3A+iOS+Push+API#ServeriOSPushAPI-Sendanotification

rromanchuk commented 11 years ago

After double checking, it looks like the aliases have to be passed in as strings or it fails

Works:

{ aliases: ["1"] }

Fails: (quietly)

{ aliases: [1] }
rromanchuk commented 11 years ago

closing, easy to screw up though...especially when doing something like this {aliases: users.map(&:id) }

schoblaska commented 11 years ago

You're right, though, this is a potentially mysterious bug to run into. I added a fix to convert all aliases to strings and did a version bump: 92c74597202e318d

rromanchuk commented 11 years ago

:+1: