Page MenuHomePhabricator

D12428.id42029.diff
No OneTemporary

D12428.id42029.diff

diff --git a/keyserver/src/fetchers/message-fetchers.js b/keyserver/src/fetchers/message-fetchers.js
--- a/keyserver/src/fetchers/message-fetchers.js
+++ b/keyserver/src/fetchers/message-fetchers.js
@@ -11,7 +11,6 @@
} from 'lib/shared/message-utils.js';
import { messageSpecs } from 'lib/shared/messages/message-specs.js';
import { getNotifCollapseKey } from 'lib/shared/notif-utils.js';
-import { hasMinCodeVersion } from 'lib/shared/version-utils.js';
import {
messageTypes,
type MessageType,
@@ -455,8 +454,6 @@
) {
if (timeFilterData.timeFilter === 'ALL') {
return true;
- } else if (timeFilterData.timeFilter === 'NONE') {
- return false;
} else if (timeFilterData.timeFilter === 'ALL_EXCEPT_EXCLUDED') {
return !timeFilterData.excludedFromTimeFilter.has(threadID);
} else {
@@ -468,7 +465,7 @@
}
type TimeFilterData =
- | { +timeFilter: 'ALL' | 'NONE' }
+ | { +timeFilter: 'ALL' }
| {
+timeFilter: 'ALL_EXCEPT_EXCLUDED',
+excludedFromTimeFilter: $ReadOnlySet<string>,
@@ -482,25 +479,17 @@
criteria: MessageSelectionCriteria,
): ParsedMessageSelectionCriteria {
const minMessageTime = Date.now() - defaultMaxMessageAge;
- const shouldApplyTimeFilter = hasMinCodeVersion(viewer.platformDetails, {
- native: 130,
- });
-
let globalTimeFilter;
if (criteria.newerThan) {
globalTimeFilter = SQL`m.time > ${criteria.newerThan}`;
- } else if (!criteria.threadCursors && shouldApplyTimeFilter) {
+ } else if (!criteria.threadCursors) {
globalTimeFilter = SQL`
(m.time > ${minMessageTime} OR m.id = mm.last_message)
`;
}
const threadConditions = [];
- if (
- criteria.joinedThreads === true &&
- shouldApplyTimeFilter &&
- !globalTimeFilter
- ) {
+ if (criteria.joinedThreads === true && !globalTimeFilter) {
threadConditions.push(SQL`
(mm.role > 0 AND (m.time > ${minMessageTime} OR m.id = mm.last_message))
`);
@@ -527,8 +516,6 @@
let timeFilterData;
if (globalTimeFilter) {
timeFilterData = { timeFilter: 'ALL' };
- } else if (!shouldApplyTimeFilter) {
- timeFilterData = { timeFilter: 'NONE' };
} else {
invariant(
criteria.threadCursors,
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
@@ -341,21 +341,14 @@
notification.contentAvailable = true;
notification.pushType = 'background';
}
- notification.payload =
- codeVersion && codeVersion > 135
- ? {
- backgroundNotifType: 'CLEAR',
- notificationId: iosID,
- setUnreadStatus: true,
- threadID,
- keyserverID,
- }
- : {
- managedAps: {
- action: 'CLEAR',
- notificationId: iosID,
- },
- };
+ notification.payload = {
+ backgroundNotifType: 'CLEAR',
+ notificationId: iosID,
+ setUnreadStatus: true,
+ threadID,
+ keyserverID,
+ };
+
return await conditionallyEncryptNotification(
encryptedNotifUtilsAPI,
{ keyserverID },
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, { native: 128 })) {
+ if (hasMinCodeVersion(platformDetails, { native: 149 })) {
return;
}
const error = new ServerError('client_version_unsupported');

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 1:15 AM (4 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2487745
Default Alt Text
D12428.id42029.diff (3 KB)

Event Timeline