Page MenuHomePhabricator

D10295.diff
No OneTemporary

D10295.diff

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<ThreadStore> =
+ tShape<ThreadStore>({
+ threadInfos: t.dict(tID, rawThreadInfoValidator),
+ });
+
export const initialReduxStateValidator: TInterface<InitialReduxStateResponse> =
tShape<InitialReduxStateResponse>({
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<ThreadStore> =
- tShape<ThreadStore>({
- threadInfos: t.dict(tID, legacyRawThreadInfoValidator),
- });
export type ClientDBThreadInfo = {
+id: string,

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 7:01 AM (12 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2704162
Default Alt Text
D10295.diff (2 KB)

Event Timeline