Fix: Save EVENT SQL

This commit is contained in:
2025-06-02 22:10:53 +08:00
parent 150635ac17
commit 6ad3e0fd1d
+2 -2
View File
@@ -354,7 +354,7 @@ async fn handle_message(
RelayMessage::OK(&event, false, e.to_string(), &to_client_msg_tx).await;
error!("Failed to save event: {}", e);
} else {
RelayMessage::OK(&event, true, "".to_string(), &to_client_msg_tx).await;
RelayMessage::OK(&event, true, "Saved".to_string(), &to_client_msg_tx).await;
}
});
} else {
@@ -437,7 +437,7 @@ impl NostrEvent {
}
_ => {}
}
let sql = "INSERT IGNORE INTO events (id, pubkey, created_at, kind, tags, content, sig) VALUES (?, ?, ?, ?, ?, ?, ?);";
let sql = "INSERT OR IGNORE INTO events (id, pubkey, created_at, kind, tags, content, sig) VALUES (?, ?, ?, ?, ?, ?, ?);";
sqlx::query(sql)
.bind(&self.id)
.bind(&self.pubkey)