GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
If a notification is sent with payload_size == 256, the delivery fails with error_code: 4 and error_description: 'Missing payload'.
The documentation says: 'The payload must not exceed 256 bytes and must not be null-terminated.' There is a problem with the the pack method in notification.rb. The documentation states 2 bytes for the payload length, the pack method uses the c value for the payload_size which is a 8-bit signed integer. So I removed the 1 and c. The other c is replaced the a n which is: Integer, 16-bit unsigned, network (big-endian) byte order.
fixed packing of the array to allow the 256 byte length in big endian
Merge pull request #47 from tompesman/missing_payload_fix
Fixed packing of the array to allow the 256 byte length in big endian
Good catch, cheers.