Fix: Save EVENT SQL
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user