diff --git a/src/app/commands.ts b/src/app/commands.ts index e0e00e91f..f58afdb12 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -330,10 +330,15 @@ export const checkRelayAuth = async (url: string, timeout = 3000) => { } export const attemptRelayAccess = async (url: string, claim = "") => { - const checks = [checkRelayProfile, checkRelayConnection, checkRelayAccess, checkRelayAuth] + const checks = [ + () => checkRelayProfile(url), + () => checkRelayConnection(url), + () => checkRelayAccess(url, claim), + () => checkRelayAuth(url), + ] for (const check of checks) { - const error = await check(url) + const error = await check() if (error) { return error diff --git a/src/app/components/SpaceAuthError.svelte b/src/app/components/SpaceAuthError.svelte new file mode 100644 index 000000000..85043787b --- /dev/null +++ b/src/app/components/SpaceAuthError.svelte @@ -0,0 +1,73 @@ + + +
diff --git a/src/app/components/SpaceInviteAccept.svelte b/src/app/components/SpaceInviteAccept.svelte index 2b795d060..83ded1dc8 100644 --- a/src/app/components/SpaceInviteAccept.svelte +++ b/src/app/components/SpaceInviteAccept.svelte @@ -62,7 +62,7 @@ let url = "" let loading = false - $: linkIsValid = Boolean(tryCatch(() => isRelayUrl(normalizeRelayUrl(url)))) + $: linkIsValid = Boolean(tryCatch(() => isRelayUrl(normalizeRelayUrl(url.split("|")[0]))))