lib/push_kit/apns/notification.rb in push_kit-apns-1.0.0.pre.beta4 vs lib/push_kit/apns/notification.rb in push_kit-apns-1.0.0.pre.beta5

- old
+ new

@@ -221,15 +221,15 @@ if (alert = payload_alert) && alert.any? aps['alert'] = alert end - aps['badge'] = badge if badge.is_a?(Integer) - aps['sound'] = sound.to_s if sound.is_a?(String) || sound.is_a?(Symbol) - aps['category'] = category if category.is_a?(String) - aps['content-available'] = 1 if content_available - aps['mutable-content'] = 1 if mutable_content + aps['badge'] = badge if badge.is_a?(Integer) + aps['sound'] = sound.to_s if sound.is_a?(String) || sound.is_a?(Symbol) + aps['category'] = category.to_s if category.is_a?(String) || category.is_a?(Symbol) + aps['content-available'] = 1 if content_available + aps['mutable-content'] = 1 if mutable_content aps end # rubocop:enable Metrics/CyclomaticComplexity # rubocop:enable Metrics/PerceivedComplexity @@ -245,11 +245,11 @@ elsif value.is_a?(Localization) alert.merge!(value.payload(key.to_sym)) end end - alert['action-loc-key'] = action_key if action_key.is_a?(String) - alert['launch-image'] = launch_image if launch_image.is_a?(String) + alert['action-loc-key'] = action_key.to_s if action_key.is_a?(String) || action_key.is_a?(Symbol) + alert['launch-image'] = launch_image if launch_image.is_a?(String) alert end end end