Skip to content

Commit

Permalink
Make added, removed, changed, optional in auth session change event, f…
Browse files Browse the repository at this point in the history
…ixes #117469
  • Loading branch information
Rachel Macfarlane committed Feb 24, 2021
1 parent 2852916 commit 7f481d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12349,17 +12349,17 @@ declare module 'vscode' {
/**
* The [AuthenticationSession](#AuthenticationSession)s of the [AuthenticationProvider](#AuthentiationProvider) that have been added.
*/
readonly added: ReadonlyArray<AuthenticationSession>;
readonly added?: ReadonlyArray<AuthenticationSession>;

/**
* The [AuthenticationSession](#AuthenticationSession)s of the [AuthenticationProvider](#AuthentiationProvider) that have been removed.
*/
readonly removed: ReadonlyArray<AuthenticationSession>;
readonly removed?: ReadonlyArray<AuthenticationSession>;

/**
* The [AuthenticationSession](#AuthenticationSession)s of the [AuthenticationProvider](#AuthentiationProvider) that have been changed.
*/
readonly changed: ReadonlyArray<AuthenticationSession>;
readonly changed?: ReadonlyArray<AuthenticationSession>;
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/vs/workbench/api/common/extHostAuthentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
}

const listener = provider.onDidChangeSessions(e => {
this._proxy.$sendDidChangeSessions(id, e);
this._proxy.$sendDidChangeSessions(id, {
added: e.added ?? [],
changed: e.changed ?? [],
removed: e.changed ?? []
});
});

this._proxy.$registerAuthenticationProvider(id, label, options?.supportsMultipleAccounts ?? false);
Expand Down

0 comments on commit 7f481d2

Please sign in to comment.