Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3360795
D7054.id23659.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
D7054.id23659.diff
View Options
diff --git a/keyserver/src/fetchers/user-fetchers.js b/keyserver/src/fetchers/user-fetchers.js
--- a/keyserver/src/fetchers/user-fetchers.js
+++ b/keyserver/src/fetchers/user-fetchers.js
@@ -200,7 +200,7 @@
viewer: Viewer,
): Promise<OldLoggedInUserInfo | LoggedInUserInfo> {
const userQuery = SQL`
- SELECT id, username
+ SELECT id, username, avatar
FROM users
WHERE id = ${viewer.userID}
`;
@@ -228,7 +228,7 @@
}
const id = userRow.id.toString();
- const { username } = userRow;
+ const { username, avatar } = userRow;
if (stillExpectsEmailFields) {
return {
@@ -242,7 +242,7 @@
const featureGateSettings = !hasMinCodeVersion(viewer.platformDetails, 1000);
if (featureGateSettings) {
- return { id, username };
+ return { id, username, avatar };
}
const settings = settingsResult.reduce((prev, curr) => {
@@ -250,7 +250,7 @@
return prev;
}, {});
- return { id, username, settings };
+ return { id, username, avatar, settings };
}
async function fetchAllUserIDs(): Promise<string[]> {
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,6 +1,7 @@
// @flow
import type { DefaultNotificationPayload } from './account-types.js';
+import type { EmojiAvatar } from './avatar-types';
import type { UserRelationshipStatus } from './relationship-types.js';
import type { UserInconsistencyReportCreationRequest } from './report-types.js';
@@ -48,6 +49,7 @@
export type LoggedInUserInfo = {
+id: string,
+username: string,
+ +avatar: ?EmojiAvatar,
+settings?: DefaultNotificationPayload,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 2:30 PM (22 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580069
Default Alt Text
D7054.id23659.diff (1 KB)
Attached To
Mode
D7054: [keyserver/lib] fetch avatar column from users table in fetchCurrentUserInfo
Attached
Detach File
Event Timeline
Log In to Comment