mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-22 09:09:07 -05:00
fix(NIP-09): correct WHERE clause for event deletion
This commit is contained in:
parent
4ad483090e
commit
9ed3391b46
|
@ -344,7 +344,7 @@ pub fn write_event(conn: &mut PooledConnection, e: &Event) -> Result<usize> {
|
||||||
.filter_map(|x| hex::decode(x).ok())
|
.filter_map(|x| hex::decode(x).ok())
|
||||||
.for_each(|x| params.push(Box::new(x)));
|
.for_each(|x| params.push(Box::new(x)));
|
||||||
let query = format!(
|
let query = format!(
|
||||||
"UPDATE event SET hidden=TRUE WHERE author=?, event_hash IN ({})",
|
"UPDATE event SET hidden=TRUE WHERE author=? AND event_hash IN ({})",
|
||||||
repeat_vars(params.len() - 1)
|
repeat_vars(params.len() - 1)
|
||||||
);
|
);
|
||||||
let mut stmt = tx.prepare(&query)?;
|
let mut stmt = tx.prepare(&query)?;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user