diff --git a/keyserver/src/utils/validation-utils.js b/keyserver/src/utils/validation-utils.js --- a/keyserver/src/utils/validation-utils.js +++ b/keyserver/src/utils/validation-utils.js @@ -5,7 +5,8 @@ import type { PolicyType } from 'lib/facts/policies.js'; import { hasMinCodeVersion, - FUTURE_CODE_VERSION, + NEXT_NATIVE_CODE_VERSION, + NEXT_WEB_CODE_VERSION, } from 'lib/shared/version-utils.js'; import { type PlatformDetails } from 'lib/types/device-types.js'; import { ServerError } from 'lib/utils/errors.js'; @@ -15,7 +16,6 @@ tPlatform, tPlatformDetails, assertWithValidator, - convertToNewIDSchema, keyserverPrefixID, convertClientIDsToServerIDs, convertObject, @@ -38,10 +38,9 @@ if ( hasMinCodeVersion(viewer.platformDetails, { - native: FUTURE_CODE_VERSION, - web: FUTURE_CODE_VERSION, - }) && - convertToNewIDSchema + native: NEXT_NATIVE_CODE_VERSION, + web: NEXT_WEB_CODE_VERSION, + }) ) { try { return convertClientIDsToServerIDs( @@ -72,12 +71,11 @@ } if ( - (hasMinCodeVersion(platformDetails, { - native: FUTURE_CODE_VERSION, - web: FUTURE_CODE_VERSION, + hasMinCodeVersion(platformDetails, { + native: NEXT_NATIVE_CODE_VERSION, + web: NEXT_WEB_CODE_VERSION, }) || - alwaysConvertSchema) && - convertToNewIDSchema + alwaysConvertSchema ) { return convertServerIDsToClientIDs( keyserverPrefixID, diff --git a/lib/selectors/socket-selectors.js b/lib/selectors/socket-selectors.js --- a/lib/selectors/socket-selectors.js +++ b/lib/selectors/socket-selectors.js @@ -42,7 +42,6 @@ tID, convertClientIDsToServerIDs, keyserverPrefixID, - convertToNewIDSchema, } from '../utils/validation-utils.js'; const queuedReports: ( @@ -75,23 +74,21 @@ currentUserInfo: ?CurrentUserInfo, calendarQuery: (calendarActive: boolean) => CalendarQuery, ) => { - if (convertToNewIDSchema) { - threadInfos = convertClientIDsToServerIDs( - keyserverPrefixID, - t.dict(tID, rawThreadInfoValidator), - threadInfos, - ); - userInfos = convertClientIDsToServerIDs( - keyserverPrefixID, - userInfosValidator, - userInfos, - ); - currentUserInfo = convertClientIDsToServerIDs( - keyserverPrefixID, - t.maybe(currentUserInfoValidator), - currentUserInfo, - ); - } + threadInfos = convertClientIDsToServerIDs( + keyserverPrefixID, + t.dict(tID, rawThreadInfoValidator), + threadInfos, + ); + userInfos = convertClientIDsToServerIDs( + keyserverPrefixID, + userInfosValidator, + userInfos, + ); + currentUserInfo = convertClientIDsToServerIDs( + keyserverPrefixID, + t.maybe(currentUserInfoValidator), + currentUserInfo, + ); return async ( calendarActive: boolean, @@ -124,13 +121,11 @@ calendarQuery(calendarActive), ); - if (convertToNewIDSchema) { - filteredEntryInfos = convertClientIDsToServerIDs( - keyserverPrefixID, - t.dict(tID, rawEntryInfoValidator), - filteredEntryInfos, - ); - } + filteredEntryInfos = convertClientIDsToServerIDs( + keyserverPrefixID, + t.dict(tID, rawEntryInfoValidator), + filteredEntryInfos, + ); const hashResults = {}; for (const key in serverRequest.hashesToCheck) { diff --git a/lib/utils/validation-utils.js b/lib/utils/validation-utils.js --- a/lib/utils/validation-utils.js +++ b/lib/utils/validation-utils.js @@ -103,7 +103,6 @@ return (data: any); } -const convertToNewIDSchema = false; const keyserverPrefixID = '256'; function convertServerIDsToClientIDs( @@ -242,7 +241,6 @@ tMediaMessageVideo, tMediaMessageMedia, assertWithValidator, - convertToNewIDSchema, keyserverPrefixID, convertClientIDsToServerIDs, convertServerIDsToClientIDs, diff --git a/native/redux/persist.js b/native/redux/persist.js --- a/native/redux/persist.js +++ b/native/redux/persist.js @@ -739,7 +739,7 @@ 'storeLoaded', ], debug: __DEV__, - version: 42, + version: 43, transforms: [messageStoreMessagesBlocklistTransform, reportStoreTransform], migrate: (createAsyncMigrate(migrations, { debug: __DEV__ }): any), timeout: ((__DEV__ ? 0 : undefined): number | void), diff --git a/web/redux/persist.js b/web/redux/persist.js --- a/web/redux/persist.js +++ b/web/redux/persist.js @@ -137,7 +137,7 @@ { debug: isDev }, migrateStorageToSQLite, ): any), - version: 2, + version: 3, }; export { persistConfig };