You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is really minor, but I cracked my head here for half an hour figuring this out:
In gcm/core.rb, you use send_notifications (plural) inside send_notification (singular).
Problem is, the plural form expects multiple responses, and, rightly so, it delivers an array of responses.
But in send_notification (singular), the user would be expecting a single response object, in this method there's no reason to return an array, because there will be a single response for a single notification.
Change send_notification like so below and problem SHOULD be solved (didn't test):
This is really minor, but I cracked my head here for half an hour figuring this out:
In gcm/core.rb, you use send_notifications (plural) inside send_notification (singular).
Problem is, the plural form expects multiple responses, and, rightly so, it delivers an array of responses.
But in send_notification (singular), the user would be expecting a single response object, in this method there's no reason to return an array, because there will be a single response for a single notification.
Change send_notification like so below and problem SHOULD be solved (didn't test):
This might also apply to APNS and Microsoft, but I've only delved in GCM so far!
Thanks for the great gem!
The text was updated successfully, but these errors were encountered: