diff --git a/lib/permissions/minimally-encoded-thread-permissions.test.js b/lib/permissions/minimally-encoded-thread-permissions.test.js --- a/lib/permissions/minimally-encoded-thread-permissions.test.js +++ b/lib/permissions/minimally-encoded-thread-permissions.test.js @@ -23,7 +23,7 @@ } from './minimally-encoded-thread-permissions.js'; import { specialRoles } from './special-roles.js'; import { - minimallyEncodeRawThreadInfo, + deprecatedMinimallyEncodeRawThreadInfo, deprecatedDecodeMinimallyEncodedRawThreadInfo, minimallyEncodeThreadCurrentUserInfo, } from '../types/minimally-encoded-thread-permissions-types.js'; @@ -522,7 +522,7 @@ it('should correctly encode RawThreadInfo', () => { expect( rawThreadInfoValidator.is( - minimallyEncodeRawThreadInfo(exampleRawThreadInfoA), + deprecatedMinimallyEncodeRawThreadInfo(exampleRawThreadInfoA), ), ).toBe(true); }); @@ -532,7 +532,7 @@ it('should correctly decode minimallyEncodedRawThreadInfo', () => { expect( deprecatedDecodeMinimallyEncodedRawThreadInfo( - minimallyEncodeRawThreadInfo(exampleRawThreadInfoA), + deprecatedMinimallyEncodeRawThreadInfo(exampleRawThreadInfoA), ), ).toStrictEqual(expectedDecodedExampleRawThreadInfoA); }); diff --git a/lib/shared/redux/deprecated-update-roles-and-permissions.js b/lib/shared/redux/deprecated-update-roles-and-permissions.js --- a/lib/shared/redux/deprecated-update-roles-and-permissions.js +++ b/lib/shared/redux/deprecated-update-roles-and-permissions.js @@ -3,7 +3,7 @@ import { legacyUpdateRolesAndPermissions } from './legacy-update-roles-and-permissions.js'; import { deprecatedDecodeMinimallyEncodedRawThreadInfo, - minimallyEncodeRawThreadInfo, + deprecatedMinimallyEncodeRawThreadInfo, type RawThreadInfo, } from '../../types/minimally-encoded-thread-permissions-types.js'; import type { @@ -36,7 +36,7 @@ updatedDecodedThreadStoreInfos[threadID]; const encodedUpdatedThreadInfo = - minimallyEncodeRawThreadInfo(updatedThreadInfo); + deprecatedMinimallyEncodeRawThreadInfo(updatedThreadInfo); updatedThreadStoreInfos[threadID] = encodedUpdatedThreadInfo; } diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -51,7 +51,7 @@ import { decodeMinimallyEncodedRoleInfo, minimallyEncodeMemberInfo, - minimallyEncodeRawThreadInfo, + deprecatedMinimallyEncodeRawThreadInfo, minimallyEncodeRoleInfo, minimallyEncodeThreadCurrentUserInfo, } from '../types/minimally-encoded-thread-permissions-types.js'; @@ -862,7 +862,8 @@ return rawThreadInfo; } - const minimallyEncoded = minimallyEncodeRawThreadInfo(rawThreadInfo); + const minimallyEncoded = + deprecatedMinimallyEncodeRawThreadInfo(rawThreadInfo); invariant(!minimallyEncoded.thick, 'ServerThreadInfo should be thin thread'); if (shouldIncludeSpecialRoleFieldInRoles) { return minimallyEncoded; diff --git a/lib/types/minimally-encoded-thread-permissions-types.js b/lib/types/minimally-encoded-thread-permissions-types.js --- a/lib/types/minimally-encoded-thread-permissions-types.js +++ b/lib/types/minimally-encoded-thread-permissions-types.js @@ -179,7 +179,7 @@ export type RawThreadInfo = ThinRawThreadInfo | ThickRawThreadInfo; -const minimallyEncodeRawThreadInfo = ( +const deprecatedMinimallyEncodeRawThreadInfo = ( rawThreadInfo: LegacyRawThreadInfo, ): RawThreadInfo => { invariant( @@ -286,6 +286,6 @@ decodeMinimallyEncodedThreadCurrentUserInfo, minimallyEncodeMemberInfo, decodeMinimallyEncodedMemberInfo, - minimallyEncodeRawThreadInfo, + deprecatedMinimallyEncodeRawThreadInfo, deprecatedDecodeMinimallyEncodedRawThreadInfo, }; diff --git a/native/redux/persist.js b/native/redux/persist.js --- a/native/redux/persist.js +++ b/native/redux/persist.js @@ -91,7 +91,7 @@ type MessageStoreThreads, type RawMessageInfo, } from 'lib/types/message-types.js'; -import { minimallyEncodeRawThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; +import { deprecatedMinimallyEncodeRawThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import type { RawThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import type { ReportStore, @@ -1047,7 +1047,7 @@ const threadInfo = threadStoreInfos[key]; acc[threadInfo.id] = threadInfo.minimallyEncoded ? threadInfo - : minimallyEncodeRawThreadInfo(threadInfo); + : deprecatedMinimallyEncodeRawThreadInfo(threadInfo); return acc; }, {},