lib/apnserver/notification.rb in bpoweski-apnserver-0.0.10 vs lib/apnserver/notification.rb in bpoweski-apnserver-0.0.12
- old
+ new
@@ -31,14 +31,14 @@
end
def push
if Config.pem.nil?
socket = TCPSocket.new(Config.host || 'localhost', Config.port.to_i || 22195)
- socket.write(notification.to_bytes)
+ socket.write(to_bytes)
else
client = ApnServer::Client.new(Config.pem, Config.host || 'gateway.push.apple.com', Config.port.to_i || 2195)
client.connect!
- client.write(notification)
+ client.write(self)
end
end
def to_bytes
json = json_payload