Page MenuHomePhorge

D10609.1765340351.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D10609.1765340351.diff

diff --git a/lib/reducers/thread-reducer.js b/lib/reducers/thread-reducer.js
--- a/lib/reducers/thread-reducer.js
+++ b/lib/reducers/thread-reducer.js
@@ -94,16 +94,10 @@
{
type: 'remove_all',
},
- ...Object.keys(newThreadInfos).map((id: string) => {
- invariant(
- newThreadInfos[id].minimallyEncoded,
- 'newThreadInfos must be minimallyEncoded for current clients',
- );
- return {
- type: 'replace',
- payload: { id, threadInfo: newThreadInfos[id] },
- };
- }),
+ ...Object.keys(newThreadInfos).map((id: string) => ({
+ type: 'replace',
+ payload: { id, threadInfo: newThreadInfos[id] },
+ })),
];
const updatedThreadStore = processThreadStoreOperations(
state,
diff --git a/lib/types/socket-types.js b/lib/types/socket-types.js
--- a/lib/types/socket-types.js
+++ b/lib/types/socket-types.js
@@ -33,7 +33,10 @@
type ClientClientResponse,
} from './request-types.js';
import type { SessionState, SessionIdentification } from './session-types.js';
-import { type RawThreadInfos } from './thread-types.js';
+import type {
+ RawThreadInfos,
+ MinimallyEncodedRawThreadInfos,
+} from './thread-types.js';
import {
type ClientUpdatesResult,
type ClientUpdatesResultWithUserInfos,
@@ -184,41 +187,42 @@
export const fullStateSyncActionType = 'FULL_STATE_SYNC';
export type BaseFullStateSync = {
+messagesResult: MessagesResponse,
- +threadInfos: RawThreadInfos,
+rawEntryInfos: $ReadOnlyArray<RawEntryInfo>,
+userInfos: $ReadOnlyArray<UserInfo>,
+updatesCurrentAsOf: number,
};
const baseFullStateSyncValidator = tShape<BaseFullStateSync>({
messagesResult: messagesResponseValidator,
- threadInfos: t.dict(tID, rawThreadInfoValidator),
rawEntryInfos: t.list(rawEntryInfoValidator),
userInfos: t.list(userInfoValidator),
updatesCurrentAsOf: t.Number,
});
-export type ClientFullStateSync = {
+export type ClientFullStateSync = $ReadOnly<{
...BaseFullStateSync,
+ +threadInfos: MinimallyEncodedRawThreadInfos,
+currentUserInfo: CurrentUserInfo,
-};
-export type StateSyncFullActionPayload = {
+}>;
+export type StateSyncFullActionPayload = $ReadOnly<{
...ClientFullStateSync,
+calendarQuery: CalendarQuery,
+keyserverID: string,
-};
-export type ClientStateSyncFullSocketPayload = {
+}>;
+export type ClientStateSyncFullSocketPayload = $ReadOnly<{
...ClientFullStateSync,
+type: 0,
// Included iff client is using sessionIdentifierTypes.BODY_SESSION_ID
+sessionID?: string,
-};
+}>;
-export type ServerFullStateSync = {
+export type ServerFullStateSync = $ReadOnly<{
...BaseFullStateSync,
+ +threadInfos: RawThreadInfos,
+currentUserInfo: CurrentUserInfo,
-};
+}>;
const serverFullStateSyncValidator = tShape<ServerFullStateSync>({
...baseFullStateSyncValidator.meta.props,
+ threadInfos: t.dict(tID, rawThreadInfoValidator),
currentUserInfo: currentUserInfoValidator,
});

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 10, 4:19 AM (15 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5859231
Default Alt Text
D10609.1765340351.diff (2 KB)

Event Timeline