Page MenuHomePhabricator

D13131.id43549.diff
No OneTemporary

D13131.id43549.diff

diff --git a/lib/push/crypto.js b/lib/push/crypto.js
--- a/lib/push/crypto.js
+++ b/lib/push/crypto.js
@@ -128,7 +128,6 @@
let unencryptedPayload = {
...rest,
- aps: { sound },
merged: alert,
badge,
};
@@ -140,7 +139,7 @@
try {
const unencryptedSerializedPayload = JSON.stringify(unencryptedPayload);
- let encryptedNotifAps = { 'mutable-content': 1 };
+ let encryptedNotifAps = { 'mutable-content': 1, sound };
if (codeVersion && codeVersion >= 254 && codeVersion % 2 === 0) {
encryptedNotifAps = {
...encryptedNotifAps,
diff --git a/lib/types/notif-types.js b/lib/types/notif-types.js
--- a/lib/types/notif-types.js
+++ b/lib/types/notif-types.js
@@ -207,16 +207,27 @@
+'apns-push-type': 'background' | 'alert' | 'voip',
};
+type EncryptedAPNsSilentNotificationsAps = {
+ +'mutable-content': number,
+ +'alert'?: { body: 'ENCRYPTED' },
+};
+
export type EncryptedAPNsSilentNotification = $ReadOnly<{
...SenderDeviceDescriptor,
+headers: APNsNotificationHeaders,
+encryptedPayload: string,
+type: '1' | '0',
- +aps: { +'mutable-content': number, +'alert'?: { body: 'ENCRYPTED' } },
+ +aps: EncryptedAPNsSilentNotificationsAps,
+}>;
+
+type EncryptedAPNsVisualNotificationAps = $ReadOnly<{
+ ...EncryptedAPNsSilentNotificationsAps,
+ +sound?: string,
}>;
export type EncryptedAPNsVisualNotification = $ReadOnly<{
...EncryptedAPNsSilentNotification,
+ +aps: EncryptedAPNsVisualNotificationAps,
+id: string,
}>;

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 9:52 PM (20 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2689594
Default Alt Text
D13131.id43549.diff (1 KB)

Event Timeline