diff --git a/keyserver/src/responders/redux-state-responders.js b/keyserver/src/responders/redux-state-responders.js --- a/keyserver/src/responders/redux-state-responders.js +++ b/keyserver/src/responders/redux-state-responders.js @@ -4,6 +4,7 @@ import t, { type TInterface } from 'tcomb'; import { baseLegalPolicies } from 'lib/facts/policies.js'; +import { rawThreadInfoValidator } from 'lib/permissions/minimally-encoded-thread-permissions-validators.js'; import { daysToEntriesFromEntryInfos } from 'lib/reducers/entry-reducer.js'; import { freshMessageStore } from 'lib/reducers/message-reducer.js'; import { mostRecentlyReadThread } from 'lib/selectors/thread-selectors.js'; @@ -28,7 +29,7 @@ } from 'lib/types/message-types.js'; import { threadPermissions } from 'lib/types/thread-permission-types.js'; import { threadTypes } from 'lib/types/thread-types-enum.js'; -import { threadStoreValidator } from 'lib/types/thread-types.js'; +import { type ThreadStore } from 'lib/types/thread-types.js'; import { currentUserInfoValidator, userInfosValidator, @@ -38,7 +39,7 @@ import { ServerError } from 'lib/utils/errors.js'; import { promiseAll } from 'lib/utils/promises.js'; import { urlInfoValidator } from 'lib/utils/url-utils.js'; -import { tShape, ashoatKeyserverID } from 'lib/utils/validation-utils.js'; +import { tShape, ashoatKeyserverID, tID } from 'lib/utils/validation-utils.js'; import { navInfoValidator } from 'web/types/nav-types.js'; import type { InitialReduxStateResponse, @@ -78,6 +79,11 @@ updatesCurrentAsOf: t.Number, }); +export const threadStoreValidator: TInterface = + tShape({ + threadInfos: t.dict(tID, rawThreadInfoValidator), + }); + export const initialReduxStateValidator: TInterface = tShape({ navInfo: navInfoValidator, diff --git a/lib/types/thread-types.js b/lib/types/thread-types.js --- a/lib/types/thread-types.js +++ b/lib/types/thread-types.js @@ -249,10 +249,6 @@ export type ThreadStore = { +threadInfos: RawThreadInfos, }; -export const threadStoreValidator: TInterface = - tShape({ - threadInfos: t.dict(tID, legacyRawThreadInfoValidator), - }); export type ClientDBThreadInfo = { +id: string,