Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3506999
D13131.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13131.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 6:58 PM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2688768
Default Alt Text
D13131.diff (1 KB)
Attached To
Mode
D13131: Fix sound issue for peer-based notifications
Attached
Detach File
Event Timeline
Log In to Comment