Avoid showing auth error before join dialog

This commit is contained in:
Jon Staab 2026-07-06 13:08:30 -07:00
parent 774e2da463
commit 9cb5e54aeb

View file

@ -41,11 +41,8 @@
// Direct links skip Discover — prompt to join when relay is not in the user's space list. // Direct links skip Discover — prompt to join when relay is not in the user's space list.
$effect(() => { $effect(() => {
if ($modal) return if ($modal) return
if ($authError) return showAuthError()
if ($relaysPendingTrust.includes(url)) return showPendingTrust()
if ($userSpaceUrls.includes(url)) return
if (joinPrompted.has(url)) return
if (!$userSpaceUrls.includes(url) && !joinPrompted.has(url)) {
if (spacesLoaded) { if (spacesLoaded) {
joinPrompted.add(url) joinPrompted.add(url)
pushModal(SpaceJoin, {url}) pushModal(SpaceJoin, {url})
@ -54,6 +51,11 @@
spacesLoaded = true spacesLoaded = true
}) })
} }
} else if ($authError) {
showAuthError()
} else if ($relaysPendingTrust.includes(url)) {
showPendingTrust()
}
}) })
</script> </script>