From 4c2ec9080ac5a7ad123222e8e48bd3827230b70b Mon Sep 17 00:00:00 2001 From: Logan Serman Date: Mon, 27 Oct 2014 17:03:11 -0500 Subject: [PATCH] Check string keys in APNS::Notifications message hash --- lib/pushmeup/apns/notification.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pushmeup/apns/notification.rb b/lib/pushmeup/apns/notification.rb index 60d76f6..6dd0356 100644 --- a/lib/pushmeup/apns/notification.rb +++ b/lib/pushmeup/apns/notification.rb @@ -5,10 +5,10 @@ class Notification def initialize(device_token, message) self.device_token = device_token if message.is_a?(Hash) - self.alert = message[:alert] - self.badge = message[:badge] - self.sound = message[:sound] - self.other = message[:other] + self.alert = message[:alert] || message['alert'] + self.badge = message[:badge] || message['badge'] + self.sound = message[:sound] || message['sound'] + self.other = message[:other] || message['other'] elsif message.is_a?(String) self.alert = message else