dondeng / gcm_on_rails

Gcm on Rails (Google Cloud Messaging for Android on Rails)
MIT License
79 stars 48 forks source link

Make data not to be nil when collapse_key is nil #29

Open kaosf opened 11 years ago

kaosf commented 11 years ago

If the pull request #28 is merged, collapse_key of notification can be nil.

When it is nil, data = notification.data.merge({:collapse_key => notification.collapse_key}) will not be executed, and data will become nil. Then, the next step of data = data.merge({ ... makes an error, because data is nil.

So, I modified it so that data is initialized by notification.data always.