Page MenuHomePhabricator

D10192.id34275.diff
No OneTemporary

D10192.id34275.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
@@ -913,7 +913,7 @@
platformDetails,
} = convertedData;
- const canDecryptNonCollapsibleTextNotifs =
+ const canDecryptNonCollapsibleTextIOSNotifs =
platformDetails.codeVersion && platformDetails.codeVersion > 222;
const isNonCollapsibleTextNotification =
@@ -921,13 +921,14 @@
newRawMessageInfo => newRawMessageInfo.type === messageTypes.TEXT,
) && !collapseKey;
- const canDecryptAllNotifTypes =
+ const canDecryptAllIOSNotifs =
platformDetails.codeVersion && platformDetails.codeVersion >= 267;
- const canDecryptIOSNotifs =
+ const canDecryptIOSNotif =
platformDetails.platform === 'ios' &&
- (canDecryptAllNotifTypes ||
- (isNonCollapsibleTextNotification && canDecryptNonCollapsibleTextNotifs));
+ (canDecryptAllIOSNotifs ||
+ (isNonCollapsibleTextNotification &&
+ canDecryptNonCollapsibleTextIOSNotifs));
const isStaffOrDev = isStaff(userID) || isDev;
const canDecryptMacOSNotifs =
@@ -938,7 +939,7 @@
majorDesktop: 9,
});
- const shouldBeEncrypted = canDecryptIOSNotifs || canDecryptMacOSNotifs;
+ const shouldBeEncrypted = canDecryptIOSNotif || canDecryptMacOSNotifs;
const uniqueID = uuidv4();
const notification = new apn.Notification();
@@ -967,7 +968,7 @@
if (platformDetails.codeVersion && platformDetails.codeVersion > 198) {
notification.mutableContent = true;
}
- if (collapseKey && (canDecryptAllNotifTypes || canDecryptMacOSNotifs)) {
+ if (collapseKey && (canDecryptAllIOSNotifs || canDecryptMacOSNotifs)) {
notification.payload.collapseID = collapseKey;
} else if (collapseKey) {
notification.collapseId = collapseKey;
@@ -1729,12 +1730,14 @@
const macosVersionsToTokens = byPlatform.get('macos');
if (macosVersionsToTokens) {
for (const [versionKey, deviceInfos] of macosVersionsToTokens) {
- const { codeVersion, stateVersion } = stringToVersionKey(versionKey);
+ const { codeVersion, stateVersion, majorDesktopVersion } =
+ stringToVersionKey(versionKey);
const notification = new apn.Notification();
notification.topic = getAPNsNotificationTopic({
platform: 'macos',
codeVersion,
stateVersion,
+ majorDesktopVersion,
});
notification.badge = unreadCount;
notification.pushType = 'alert';

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 4:49 AM (13 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2560016
Default Alt Text
D10192.id34275.diff (2 KB)

Event Timeline