mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 23:16:50 +02:00
fix: don't show relay auth dialog when user is not logged in
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user