diff --git a/lib/shared/redux/update-roles-and-permissions.js b/lib/shared/redux/deprecated-update-roles-and-permissions.js rename from lib/shared/redux/update-roles-and-permissions.js rename to lib/shared/redux/deprecated-update-roles-and-permissions.js --- a/lib/shared/redux/update-roles-and-permissions.js +++ b/lib/shared/redux/deprecated-update-roles-and-permissions.js @@ -12,7 +12,7 @@ } from '../../types/thread-types.js'; import type { RawThreadInfoWithMemberPermissions } from '../../types/minimally-encoded-thread-permissions-types.js'; -function updateRolesAndPermissions( +function deprecatedUpdateRolesAndPermissions( threadStoreInfos: RawThreadInfos, ): RawThreadInfos { const decodedThreadStoreInfos: { [id: string]: LegacyRawThreadInfo } = {}; @@ -21,6 +21,7 @@ const rawThreadInfo = threadStoreInfos[threadID]; const decodedThreadInfo = + // $FlowIgnore: `rawThreadInfo` has member permissions at point of migration decodeMinimallyEncodedRawThreadInfo(rawThreadInfo); decodedThreadStoreInfos[threadID] = decodedThreadInfo; @@ -39,10 +40,11 @@ const encodedUpdatedThreadInfo = minimallyEncodeRawThreadInfo(updatedThreadInfo); + // $FlowIgnore: `rawThreadInfo` has member permissions at point of migration updatedThreadStoreInfos[threadID] = encodedUpdatedThreadInfo; } return updatedThreadStoreInfos; } -export { updateRolesAndPermissions }; +export { deprecatedUpdateRolesAndPermissions }; diff --git a/native/redux/persist.js b/native/redux/persist.js --- a/native/redux/persist.js +++ b/native/redux/persist.js @@ -61,7 +61,7 @@ import { highestLocalIDSelector } from 'lib/selectors/local-id-selectors.js'; import { createUpdateDBOpsForThreadStoreThreadInfos } from 'lib/shared/redux/client-db-utils.js'; import { legacyUpdateRolesAndPermissions } from 'lib/shared/redux/legacy-update-roles-and-permissions.js'; -import { updateRolesAndPermissions } from 'lib/shared/redux/update-roles-and-permissions.js'; +import { deprecatedUpdateRolesAndPermissions } from 'lib/shared/redux/deprecated-update-roles-and-permissions.js'; import { inconsistencyResponsesToReports } from 'lib/shared/report-utils.js'; import { getContainingThreadID, @@ -1396,7 +1396,7 @@ const dbOperations = createUpdateDBOpsForThreadStoreThreadInfos( clientDBThreadInfos, - updateRolesAndPermissions, + deprecatedUpdateRolesAndPermissions, ); return { diff --git a/web/redux/persist.js b/web/redux/persist.js --- a/web/redux/persist.js +++ b/web/redux/persist.js @@ -19,7 +19,7 @@ import type { ClientDBThreadStoreOperation } from 'lib/ops/thread-store-ops.js'; import { patchRawThreadInfoWithSpecialRole } from 'lib/permissions/special-roles.js'; import { createUpdateDBOpsForThreadStoreThreadInfos } from 'lib/shared/redux/client-db-utils.js'; -import { updateRolesAndPermissions } from 'lib/shared/redux/update-roles-and-permissions.js'; +import { deprecatedUpdateRolesAndPermissions } from 'lib/shared/redux/deprecated-update-roles-and-permissions.js'; import { keyserverStoreTransform } from 'lib/shared/transforms/keyserver-store-transform.js'; import { messageStoreMessagesBlocklistTransform } from 'lib/shared/transforms/message-store-transform.js'; import { defaultAlertInfos } from 'lib/types/alert-types.js'; @@ -591,7 +591,7 @@ const dbOperations = createUpdateDBOpsForThreadStoreThreadInfos( clientDBThreadInfos, - updateRolesAndPermissions, + deprecatedUpdateRolesAndPermissions, ); return {