[MM-54402] Change protocol transform method for Desktop Auth to be compliant with web standards (#24479)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c656ca3fe3
Коммит
01cf4b459f
@@ -85,13 +85,12 @@ const DesktopAuthToken: React.FC<Props> = ({href, onLogin}: Props) => {
|
||||
|
||||
const forwardToDesktopApp = () => {
|
||||
const url = new URL(window.location.href);
|
||||
let protocol = 'mattermost';
|
||||
if (url.searchParams.get('isDesktopDev')) {
|
||||
url.protocol = 'mattermost-dev';
|
||||
} else {
|
||||
url.protocol = 'mattermost';
|
||||
protocol = 'mattermost-dev';
|
||||
}
|
||||
|
||||
window.location.href = url.toString();
|
||||
window.location.href = url.toString().replace(url.protocol, `${protocol}:`);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Ссылка в новой задаче
Block a user