Skip to content

Commit

Permalink
Fix avatar for enterprise
Browse files Browse the repository at this point in the history
Fixes #2771
  • Loading branch information
alexr00 committed Jun 11, 2021
1 parent 5b2f18a commit 13ab0a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/github/folderRepositoryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ export class FolderRepositoryManager implements vscode.Disposable {
login,
},
});
return parseGraphQLUser(data);
return parseGraphQLUser(data, githubRepository);
} catch (e) {
console.log(e);
}
Expand Down
4 changes: 2 additions & 2 deletions src/github/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,11 +728,11 @@ export function parseGraphQLTimelineEvents(
return normalizedEvents;
}

export function parseGraphQLUser(user: GraphQL.UserResponse): User {
export function parseGraphQLUser(user: GraphQL.UserResponse, githubRepository: GitHubRepository): User {
return {
login: user.user.login,
name: user.user.name,
avatarUrl: user.user.avatarUrl,
avatarUrl: user.user.avatarUrl ? getAvatarWithEnterpriseFallback(user.user.avatarUrl, undefined, githubRepository.remote.authProviderId) : undefined,
url: user.user.url,
bio: user.user.bio,
company: user.user.company,
Expand Down

0 comments on commit 13ab0a7

Please sign in to comment.