Changeset View
Changeset View
Standalone View
Standalone View
lib/types/user-types.js
// @flow | // @flow | ||||
import type { DefaultNotificationPayload } from './account-types.js'; | import type { DefaultNotificationPayload } from './account-types.js'; | ||||
import type { EmojiAvatar } from './avatar-types'; | |||||
import type { UserRelationshipStatus } from './relationship-types.js'; | import type { UserRelationshipStatus } from './relationship-types.js'; | ||||
import type { UserInconsistencyReportCreationRequest } from './report-types.js'; | import type { UserInconsistencyReportCreationRequest } from './report-types.js'; | ||||
export type GlobalUserInfo = { | export type GlobalUserInfo = { | ||||
+id: string, | +id: string, | ||||
+username: ?string, | +username: ?string, | ||||
}; | }; | ||||
Show All 31 Lines | export type OldLoggedInUserInfo = { | ||||
+username: string, | +username: string, | ||||
+email: string, | +email: string, | ||||
+emailVerified: boolean, | +emailVerified: boolean, | ||||
}; | }; | ||||
export type LoggedInUserInfo = { | export type LoggedInUserInfo = { | ||||
+id: string, | +id: string, | ||||
+username: string, | +username: string, | ||||
+avatar: ?EmojiAvatar, | |||||
ginsu: Again we will update this type in a subsequent diff when the logic for avatars with images are… | |||||
ashoatUnsubmitted Not Done Inline ActionsThis needs to be optional. Otherwise you are going to cause currentUserInfo inconsistencies for literally every active client, since they will all be missing avatar: undefined that keyserver expects them to have. The state check mechanism will identify these inconsistencies and force every client to reload its currentUserInfo ashoat: This needs to be optional. Otherwise you are going to cause `currentUserInfo` inconsistencies… | |||||
ginsuAuthorUnsubmitted Done Inline ActionsGot it. Thinking about this again with a better understanding I see what you mean. This comment on linear from earlier today really helped me better understand how/when we need to think about older clients ginsu: Got it. Thinking about this again with a better understanding I see what you mean. This… | |||||
+settings?: DefaultNotificationPayload, | +settings?: DefaultNotificationPayload, | ||||
}; | }; | ||||
export type LoggedOutUserInfo = { | export type LoggedOutUserInfo = { | ||||
+id: string, | +id: string, | ||||
+anonymous: true, | +anonymous: true, | ||||
}; | }; | ||||
Show All 18 Lines |
Again we will update this type in a subsequent diff when the logic for avatars with images are introduced