[MM-19919] Allow links to other servers to go directly to that server in the app (#1165)

* [MM-19919] Allow links to other servers to go directly to that server in the app

* Added index to getSerrver() and used that for handling inter team links
This commit is contained in:
Devin Binnie
2020-01-23 10:46:17 -05:00
committed by GitHub
parent cf097e624f
commit 31cc745748
3 changed files with 24 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ function getServer(inputURL, teams) {
// check server and subpath matches (without subpath pathname is \ so it always matches)
if (parsedServerUrl.origin === parsedURL.origin && parsedURL.pathname.startsWith(parsedServerUrl.pathname)) {
return {name: teams[i].name, url: parsedServerUrl};
return {name: teams[i].name, url: parsedServerUrl, index: i};
}
}
return null;