Skip to content

Commit

Permalink
Fix Teams chat link in WebExtensionContext.ts and getTeamChatURL in c…
Browse files Browse the repository at this point in the history
…ommonUtil.ts (#898)

Co-authored-by: tyaginidhi <[email protected]>
  • Loading branch information
ritikramuka and tyaginidhi authored Apr 9, 2024
1 parent 4ec38bc commit 3d602f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/web/client/WebExtensionContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ class WebExtensionContext implements IWebExtensionContext {
return;
} else {
const teamsChatLink = getTeamChatURL(mail);
vscode.env.openExternal(vscode.Uri.parse(teamsChatLink.href));
vscode.env.openExternal(vscode.Uri.parse(teamsChatLink));
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/web/client/utilities/commonUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ export function getImageFileContent(fileFsPath: string, fileContent: Uint8Array)
return webFileV2 ? fileContent : convertContentToString(fileContent, true);
}

export function getTeamChatURL (mail: string) {
return new URL(mail, "https://teams.microsoft.com/l/chat/0/0?users=");
export function getTeamChatURL(mail: string) {
return "https://teams.microsoft.com/l/chat/0/0?users=" + encodeURIComponent(mail);
}

export function getMailToPath (mail: string) {
Expand Down

0 comments on commit 3d602f4

Please sign in to comment.