Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios_notifications/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class NotificationPayloadSizeExceeded(Exception):
def __init__(self, message='The notification maximum payload size of 256 bytes was exceeded'):
def __init__(self, message='The notification maximum payload size of 2048 bytes was exceeded'):
super(NotificationPayloadSizeExceeded, self).__init__(message)


Expand Down
4 changes: 2 additions & 2 deletions ios_notifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def pack_message(self, payload, device):
"""
Converts a notification payload into binary form.
"""
if len(payload) > 256:
if len(payload) > 2048:
raise NotificationPayloadSizeExceeded
if not isinstance(device, Device):
raise TypeError('device must be an instance of ios_notifications.models.Device')
Expand Down Expand Up @@ -259,7 +259,7 @@ def is_valid_length(self):

returns bool
"""
return len(self.payload) <= 256
return len(self.payload) <= 2048

@property
def payload(self):
Expand Down