From 3965ba04d80a5ff33b0ef4d96dfe363b6ca30e51 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 23 Feb 2026 14:24:55 -0400 Subject: [PATCH] v1.2.14 - Handle late admin verification response: grant access even if timeout already fired and access-denied overlay was shown --- api/index.js | 10 ++++++---- src/main.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/index.js b/api/index.js index 28b6ccf..c12a323 100644 --- a/api/index.js +++ b/api/index.js @@ -1851,11 +1851,12 @@ function handleSystemCommandResponse(responseData) { console.log('Command:', responseData.command); console.log('Status:', responseData.status); - // Handle admin verification via system_status response - if (responseData.command === 'system_status' && pendingAdminVerification) { + // Handle admin verification via system_status response. + // Also handle late responses that arrive after the timeout fired (relay was under load). + if (responseData.command === 'system_status' && (pendingAdminVerification || (isLoggedIn && !isAdminVerified))) { console.log('✅ Admin verification successful - received system_status response'); - // Clear the timeout + // Clear the timeout if still pending if (adminVerificationTimeout) { clearTimeout(adminVerificationTimeout); adminVerificationTimeout = null; @@ -1864,8 +1865,9 @@ function handleSystemCommandResponse(responseData) { pendingAdminVerification = false; isAdminVerified = true; - // Hide loading overlay + // Hide loading overlay and access denied overlay (in case timeout already showed it) hideAdminVerificationLoading(); + hideAccessDeniedOverlay(); // Show admin sections now that we're verified updateAdminSectionsVisibility(); diff --git a/src/main.h b/src/main.h index 7a9ff33..89c1b81 100644 --- a/src/main.h +++ b/src/main.h @@ -13,8 +13,8 @@ // Using CRELAY_ prefix to avoid conflicts with nostr_core_lib VERSION macros #define CRELAY_VERSION_MAJOR 1 #define CRELAY_VERSION_MINOR 2 -#define CRELAY_VERSION_PATCH 13 -#define CRELAY_VERSION "v1.2.13" +#define CRELAY_VERSION_PATCH 14 +#define CRELAY_VERSION "v1.2.14" // Relay metadata (authoritative source for NIP-11 information) #define RELAY_NAME "C-Relay"