From 9ed3391b4637bc2d16b9b8195050270e07a0ae74 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Tue, 10 May 2022 16:50:52 -0500 Subject: [PATCH] fix(NIP-09): correct WHERE clause for event deletion --- src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index b2a54e1..cbc0172 100644 --- a/src/db.rs +++ b/src/db.rs @@ -344,7 +344,7 @@ pub fn write_event(conn: &mut PooledConnection, e: &Event) -> Result { .filter_map(|x| hex::decode(x).ok()) .for_each(|x| params.push(Box::new(x))); 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) ); let mut stmt = tx.prepare(&query)?;