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 @@ -16,7 +16,6 @@ tPlatform, tPlatformDetails, assertWithValidator, - convertToNewIDSchema, keyserverPrefixID, convertClientIDsToServerIDs, convertObject, @@ -41,8 +40,7 @@ hasMinCodeVersion(viewer.platformDetails, { native: NEXT_NATIVE_CODE_VERSION, web: NEXT_WEB_CODE_VERSION, - }) && - convertToNewIDSchema + }) ) { try { return convertClientIDsToServerIDs( @@ -73,11 +71,10 @@ } if ( - (hasMinCodeVersion(platformDetails, { + hasMinCodeVersion(platformDetails, { native: NEXT_NATIVE_CODE_VERSION, web: NEXT_WEB_CODE_VERSION, - }) && - convertToNewIDSchema) || + }) || alwaysConvertSchema ) { return convertServerIDsToClientIDs( 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,