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 { - deprecatedMinimallyEncodeRawThreadInfo, + minimallyEncodeRawThreadInfoWithMemberPermissions, deprecatedDecodeMinimallyEncodedRawThreadInfo, minimallyEncodeThreadCurrentUserInfo, } from '../types/minimally-encoded-thread-permissions-types.js'; @@ -522,7 +522,9 @@ it('should correctly encode RawThreadInfo', () => { expect( rawThreadInfoValidator.is( - deprecatedMinimallyEncodeRawThreadInfo(exampleRawThreadInfoA), + minimallyEncodeRawThreadInfoWithMemberPermissions( + exampleRawThreadInfoA, + ), ), ).toBe(true); }); @@ -532,7 +534,9 @@ it('should correctly decode minimallyEncodedRawThreadInfo', () => { expect( deprecatedDecodeMinimallyEncodedRawThreadInfo( - deprecatedMinimallyEncodeRawThreadInfo(exampleRawThreadInfoA), + minimallyEncodeRawThreadInfoWithMemberPermissions( + 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, - deprecatedMinimallyEncodeRawThreadInfo, + minimallyEncodeRawThreadInfoWithMemberPermissions, type RawThreadInfo, } from '../../types/minimally-encoded-thread-permissions-types.js'; import type { @@ -36,7 +36,7 @@ updatedDecodedThreadStoreInfos[threadID]; const encodedUpdatedThreadInfo = - deprecatedMinimallyEncodeRawThreadInfo(updatedThreadInfo); + minimallyEncodeRawThreadInfoWithMemberPermissions(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, - deprecatedMinimallyEncodeRawThreadInfo, + minimallyEncodeRawThreadInfoWithMemberPermissions, minimallyEncodeRoleInfo, minimallyEncodeThreadCurrentUserInfo, } from '../types/minimally-encoded-thread-permissions-types.js'; @@ -866,7 +866,7 @@ } const minimallyEncodedRawThreadInfoWithMemberPermissions = - deprecatedMinimallyEncodeRawThreadInfo(rawThreadInfo); + minimallyEncodeRawThreadInfoWithMemberPermissions(rawThreadInfo); invariant( !minimallyEncodedRawThreadInfoWithMemberPermissions.thick, 'ServerThreadInfo should be thin thread', 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 deprecatedMinimallyEncodeRawThreadInfo = ( +const minimallyEncodeRawThreadInfoWithMemberPermissions = ( rawThreadInfo: LegacyRawThreadInfo, ): RawThreadInfo => { invariant( @@ -289,6 +289,6 @@ decodeMinimallyEncodedThreadCurrentUserInfo, minimallyEncodeMemberInfo, decodeMinimallyEncodedMemberInfo, - deprecatedMinimallyEncodeRawThreadInfo, + minimallyEncodeRawThreadInfoWithMemberPermissions, 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 { deprecatedMinimallyEncodeRawThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; +import { minimallyEncodeRawThreadInfoWithMemberPermissions } 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 - : deprecatedMinimallyEncodeRawThreadInfo(threadInfo); + : minimallyEncodeRawThreadInfoWithMemberPermissions(threadInfo); return acc; }, {},