Skip to content

Commit 73a2c10

Browse files
authored
Use org name if available in notification (microsoft#210816)
1 parent b847d7d commit 73a2c10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/accountEntitlements/browser/accountsEntitlements.contribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ class EntitlementsContribution extends Disposable implements IWorkbenchContribut
147147
}
148148
this.telemetryService.publicLog2<{ enabled: boolean }, EntitlementEnablementClassification>('entitlements.enabled', { enabled: true });
149149
this.isInitialized = true;
150-
const orgs = parsedResult['organization_login_list'] as any[];
151-
return [true, orgs ? orgs[orgs.length - 1] : undefined];
150+
const orgs: { login: string; name: string }[] = parsedResult['organization_list'] as { login: string; name: string }[];
151+
return [true, orgs && orgs.length > 0 ? (orgs[0].name ? orgs[0].name : orgs[0].login) : undefined];
152152
}
153153

154154
private async enableEntitlements(session: AuthenticationSession) {

0 commit comments

Comments
 (0)