Skip to content

Commit 9f63195

Browse files
increase payload size to 2kb
1 parent d48a786 commit 9f63195

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ios_notifications/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class NotificationPayloadSizeExceeded(Exception):
2-
def __init__(self, message='The notification maximum payload size of 256 bytes was exceeded'):
2+
def __init__(self, message='The notification maximum payload size of 2048 bytes was exceeded'):
33
super(NotificationPayloadSizeExceeded, self).__init__(message)
44

55

ios_notifications/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def pack_message(self, payload, device):
170170
"""
171171
Converts a notification payload into binary form.
172172
"""
173-
if len(payload) > 256:
173+
if len(payload) > 2048:
174174
raise NotificationPayloadSizeExceeded
175175
if not isinstance(device, Device):
176176
raise TypeError('device must be an instance of ios_notifications.models.Device')

0 commit comments

Comments
 (0)