lib/rapnd/notification.rb in rapnd-0.2.0 vs lib/rapnd/notification.rb in rapnd-0.2.1

- old
+ new

@@ -9,16 +9,12 @@ raise "Must provide device token: #{hash}" if self.device_token.nil? self.device_token = self.device_token.delete(' ') end def payload - if badge.nil? && sound.nil? - p = alert - else - p = Hash.new - [:badge, :alert, :sound].each do |k| - p[k] = send(k) if send(k) - end + p = Hash.new + [:badge, :alert, :sound].each do |k| + p[k] = send(k) if send(k) end aps = {:aps => p} aps.merge!(custom) if custom aps end \ No newline at end of file