Page MenuHomePhorge

D5229.1768405364.diff
No OneTemporary

Size
938 B
Referenced Files
None
Subscribers
None

D5229.1768405364.diff

diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -513,6 +513,11 @@
if (copyWithMessageInfos.length() <= apnMaxNotificationPayloadByteSize) {
notification.payload.messageInfos = messageInfos;
}
+ if (notification.length() > apnMaxNotificationPayloadByteSize) {
+ console.warn(
+ 'iOS notification exceeds size limit, even with messageInfos omitted',
+ );
+ }
return notification;
}
@@ -564,8 +569,17 @@
fcmMaxNotificationPayloadByteSize
) {
return copyWithMessageInfos;
+ } else {
+ if (
+ Buffer.byteLength(JSON.stringify(notification)) >
+ fcmMaxNotificationPayloadByteSize
+ ) {
+ console.warn(
+ 'Android notification exceeds size limit, even with messageInfos omitted',
+ );
+ }
+ return notification;
}
- return notification;
}
type NotificationInfo =

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 14, 3:42 PM (7 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5928697
Default Alt Text
D5229.1768405364.diff (938 B)

Event Timeline