Skip to content

Commit

Permalink
Inline consts
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed May 13, 2024
1 parent 50c8cb7 commit 64f0bb5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/vector/platform/ElectronPlatform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ interface SquirrelUpdate {
updateURL: string;
}

const LEGACY_PROTOCOL = "element";
const OIDC_PROTOCOL = "io.element.desktop";
const SSO_ID_KEY = "element-desktop-ssoid";

const isMac = navigator.platform.toUpperCase().includes("MAC");
Expand Down Expand Up @@ -381,7 +379,7 @@ export default class ElectronPlatform extends VectorBasePlatform {

public getSSOCallbackUrl(fragmentAfterLogin?: string): URL {
const url = super.getSSOCallbackUrl(fragmentAfterLogin);
url.protocol = LEGACY_PROTOCOL;
url.protocol = "element";
url.searchParams.set(SSO_ID_KEY, this.ssoID);
return url;
}
Expand Down Expand Up @@ -465,7 +463,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
*/
public getOidcCallbackUrl(): URL {
const url = super.getOidcCallbackUrl();
url.protocol = OIDC_PROTOCOL;
url.protocol = "io.element.desktop";
return url;
}
}

0 comments on commit 64f0bb5

Please sign in to comment.