Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix checking size from total message to payload (part of message)

  • Loading branch information...
commit 2d0369cbcaae985851cc783efc2e22859d2ab251 1 parent 515603a
@niku authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/apn_on_rails/app/models/apn/notification.rb
View
2  lib/apn_on_rails/app/models/apn/notification.rb
@@ -81,7 +81,7 @@ def to_apple_json
def message_for_sending
json = self.to_apple_json
message = "\0\0 #{self.device.to_hexa}#{[json.length].pack('n')}#{json}"
- raise APN::Errors::ExceededMessageSizeError.new(message) if message.size.to_i > 256
+ raise APN::Errors::ExceededMessageSizeError.new(message) if json.size.to_i > 256
message
end
Please sign in to comment.
Something went wrong with that request. Please try again.