Page MenuHomePhabricator

D4732.id15710.diff
No OneTemporary

D4732.id15710.diff

diff --git a/keyserver/src/push/rescind.js b/keyserver/src/push/rescind.js
--- a/keyserver/src/push/rescind.js
+++ b/keyserver/src/push/rescind.js
@@ -66,20 +66,6 @@
codeVersion: null,
});
receivingDeviceTokens.push(...delivery.iosDeviceTokens);
- } else if (delivery.androidID) {
- // Old Android
- const notification = prepareAndroidNotification(
- row.collapse_key ? row.collapse_key : id,
- row.unread_count,
- threadID,
- null,
- );
- deliveryPromises[id] = fcmPush({
- notification,
- deviceTokens: delivery.androidDeviceTokens,
- codeVersion: null,
- });
- receivingDeviceTokens.push(...delivery.androidDeviceTokens);
} else if (delivery.deviceType === 'ios') {
// New iOS
const { iosID, deviceTokens, codeVersion } = delivery;
@@ -102,7 +88,6 @@
row.collapse_key ? row.collapse_key : id,
row.unread_count,
threadID,
- codeVersion,
);
deliveryPromises[id] = fcmPush({
notification,
@@ -197,19 +182,7 @@
notifID: string,
unreadCount: number,
threadID: string,
- codeVersion: ?number,
): Object {
- if (!codeVersion || codeVersion < 31) {
- return {
- data: {
- badge: unreadCount.toString(),
- custom_notification: JSON.stringify({
- rescind: 'true',
- notifID,
- }),
- },
- };
- }
return {
data: {
badge: unreadCount.toString(),
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
@@ -546,26 +546,7 @@
messageInfos,
},
};
- } else if (codeVersion < 31) {
- return {
- data: {
- badge: unreadCount.toString(),
- custom_notification: JSON.stringify({
- channel: 'default',
- body: merged,
- badgeCount: unreadCount,
- id: notifID,
- priority: 'high',
- sound: 'default',
- icon: 'notif_icon',
- threadID: threadInfo.id,
- messageInfos,
- click_action: 'fcm.ACTION.HELLO',
- }),
- },
- };
}
-
return {
data: {
badge: unreadCount.toString(),
diff --git a/keyserver/src/session/version.js b/keyserver/src/session/version.js
--- a/keyserver/src/session/version.js
+++ b/keyserver/src/session/version.js
@@ -10,7 +10,7 @@
viewer: Viewer,
platformDetails: ?PlatformDetails,
) {
- if (hasMinCodeVersion(platformDetails, 24)) {
+ if (hasMinCodeVersion(platformDetails, 32)) {
return;
}
const error = new ServerError('client_version_unsupported');
diff --git a/lib/shared/messages/multimedia-message-spec.js b/lib/shared/messages/multimedia-message-spec.js
--- a/lib/shared/messages/multimedia-message-spec.js
+++ b/lib/shared/messages/multimedia-message-spec.js
@@ -192,20 +192,7 @@
rawMessageInfo,
platformDetails,
);
- if (hasMinCodeVersion(platformDetails, 30)) {
- return shimmedRawMessageInfo;
- }
- const { id } = shimmedRawMessageInfo;
- invariant(id !== null && id !== undefined, 'id should be set on server');
- return {
- type: messageTypes.UNSUPPORTED,
- id,
- threadID: shimmedRawMessageInfo.threadID,
- creatorID: shimmedRawMessageInfo.creatorID,
- time: shimmedRawMessageInfo.time,
- robotext: multimediaMessagePreview(shimmedRawMessageInfo),
- unsupportedMessageInfo: shimmedRawMessageInfo,
- };
+ return shimmedRawMessageInfo;
} else {
const shimmedRawMessageInfo = shimMediaMessageInfo(
rawMessageInfo,

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 8:43 AM (20 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2574712
Default Alt Text
D4732.id15710.diff (3 KB)

Event Timeline