[MM-51406] Check for other server URLs when trying to navigate (#2616)

This commit is contained in:
Devin Binnie
2023-03-15 09:08:33 -04:00
committed by GitHub
parent dc2cacecd4
commit 37e7fb1100

View File

@@ -241,6 +241,12 @@ export class WebContentsEventManager {
return {action: 'deny'};
}
const otherServerURL = WindowManager.viewManager?.getViewByURL(parsedURL);
if (otherServerURL && urlUtils.isTeamUrl(otherServerURL.server.url, parsedURL, true)) {
WindowManager.showMainWindow(parsedURL);
return {action: 'deny'};
}
// If all else fails, just open externally
shell.openExternal(details.url);
return {action: 'deny'};