Page MenuHomePhabricator

D13131.diff
No OneTemporary

D13131.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
@@ -203,16 +203,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
Thu, Sep 19, 6:21 PM (3 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2141556
Default Alt Text
D13131.diff (1 KB)

Event Timeline