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,18 +41,20 @@
// 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 (spacesLoaded) { if (!$userSpaceUrls.includes(url) && !joinPrompted.has(url)) {
joinPrompted.add(url) if (spacesLoaded) {
pushModal(SpaceJoin, {url}) joinPrompted.add(url)
} else { pushModal(SpaceJoin, {url})
loadUserGroupList([url]).then(() => { } else {
spacesLoaded = true loadUserGroupList([url]).then(() => {
}) spacesLoaded = true
})
}
} else if ($authError) {
showAuthError()
} else if ($relaysPendingTrust.includes(url)) {
showPendingTrust()
} }
}) })
</script> </script>