Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3382394
D7109.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7109.diff
View Options
diff --git a/lib/types/avatar-types.js b/lib/types/avatar-types.js
--- a/lib/types/avatar-types.js
+++ b/lib/types/avatar-types.js
@@ -25,3 +25,15 @@
export type UpdateUserAvatarRequest =
| AvatarDBContent
| UpdateUserAvatarRemoveRequest;
+
+export type ClientEmojiAvatar = EmojiAvatarDBContent;
+export type ClientImageAvatar = {
+ +type: 'image',
+ +uri: string,
+};
+export type ClientENSAvatar = ENSAvatarDBContent;
+
+export type ClientAvatar =
+ | ClientEmojiAvatar
+ | ClientImageAvatar
+ | ClientENSAvatar;
diff --git a/lib/types/user-types.js b/lib/types/user-types.js
--- a/lib/types/user-types.js
+++ b/lib/types/user-types.js
@@ -1,23 +1,27 @@
// @flow
import type { DefaultNotificationPayload } from './account-types.js';
+import type { ClientAvatar } from './avatar-types.js';
import type { UserRelationshipStatus } from './relationship-types.js';
import type { UserInconsistencyReportCreationRequest } from './report-types.js';
export type GlobalUserInfo = {
+id: string,
+username: ?string,
+ +avatar?: ?ClientAvatar,
};
export type GlobalAccountUserInfo = {
+id: string,
+username: string,
+ +avatar?: ?ClientAvatar,
};
export type UserInfo = {
+id: string,
+username: ?string,
+relationshipStatus?: UserRelationshipStatus,
+ +avatar?: ?ClientAvatar,
};
export type UserInfos = { +[id: string]: UserInfo };
@@ -25,6 +29,7 @@
+id: string,
+username: string,
+relationshipStatus?: UserRelationshipStatus,
+ +avatar?: ?ClientAvatar,
};
export type UserStore = {
@@ -36,6 +41,7 @@
+id: string,
+username: ?string,
+isViewer: boolean,
+ +avatar?: ?ClientAvatar,
};
export type OldLoggedInUserInfo = {
@@ -49,6 +55,7 @@
+id: string,
+username: string,
+settings?: DefaultNotificationPayload,
+ +avatar?: ?ClientAvatar,
};
export type LoggedOutUserInfo = {
@@ -73,4 +80,5 @@
+notice?: string,
+alertText?: string,
+alertTitle?: string,
+ +avatar?: ?ClientAvatar,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 10:33 AM (22 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596670
Default Alt Text
D7109.diff (1 KB)
Attached To
Mode
D7109: [lib] Introduce `ClientAvatar` and introduce `avatar` field for `*UserInfo` types
Attached
Detach File
Event Timeline
Log In to Comment