v1.2.14 - Handle late admin verification response: grant access even if timeout already fired and access-denied overlay was shown
This commit is contained in:
+6
-4
@@ -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();
|
||||
|
||||
+2
-2
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user