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 @@ -72,19 +72,8 @@ }); 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); + // Dropped support for old Android + continue; } else if (delivery.deviceType === 'ios') { // New iOS const { iosID, deviceTokens, codeVersion } = delivery; @@ -107,7 +96,6 @@ row.collapse_key ? row.collapse_key : id, row.unread_count, threadID, - codeVersion, ); deliveryPromises[id] = fcmPush({ notification, @@ -202,19 +190,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 @@ -547,26 +547,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');