v1.2.37 - Fix: executeSqlQueryRaw uses relayPool/sendAdminCommand instead of undefined pool variable
This commit is contained in:
+2
-16
@@ -6205,27 +6205,13 @@ async function loadIpBans() {
|
||||
|
||||
// Execute SQL query and handle IP bans response
|
||||
async function executeSqlQueryRaw(query, queryId) {
|
||||
if (!pool || pool.length === 0) {
|
||||
if (!relayPool) {
|
||||
log('Not connected to relay', 'ERROR');
|
||||
return;
|
||||
}
|
||||
|
||||
const relay = pool[0];
|
||||
if (!relay) {
|
||||
log('No relay connection available', 'ERROR');
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a kind 23456 event with SQL query
|
||||
const event = {
|
||||
kind: 23456,
|
||||
content: query,
|
||||
tags: [['t', 'sql_query'], ['id', queryId]],
|
||||
created_at: Math.floor(Date.now() / 1000)
|
||||
};
|
||||
|
||||
try {
|
||||
await relay.publish(event);
|
||||
await sendAdminCommand(['sql_query', query, queryId]);
|
||||
log('Loading IP bans...', 'INFO');
|
||||
} catch (error) {
|
||||
log('Failed to load IP bans: ' + error.message, 'ERROR');
|
||||
|
||||
File diff suppressed because one or more lines are too long
+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 36
|
||||
#define CRELAY_VERSION "v1.2.36"
|
||||
#define CRELAY_VERSION_PATCH 37
|
||||
#define CRELAY_VERSION "v1.2.37"
|
||||
|
||||
// Relay metadata (authoritative source for NIP-11 information)
|
||||
#define RELAY_NAME "C-Relay"
|
||||
|
||||
Reference in New Issue
Block a user