fix: don't show relay auth dialog when user is not logged in (#32)

Previously, the auth dialog would appear whenever a relay sent an AUTH
challenge, even when there was no active user session. This was confusing
for users who weren't logged in.

Now the shouldPromptAuth() method checks if there's an active account
before returning true, ensuring auth dialogs only appear for logged-in users.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Alejandro
2026-01-04 18:46:15 +01:00
committed by GitHub
parent 38faf16723
commit a4eff14620

View File

@@ -491,6 +491,9 @@ class RelayStateManager {
try {
const normalizedUrl = normalizeRelayURL(relayUrl);
// Don't prompt if there's no active account
if (!accountManager.active) return false;
// Check permanent preferences
const pref = this.authPreferences.get(normalizedUrl);
if (pref === "never") return false;