nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit 9ed3391b4637bc2d16b9b8195050270e07a0ae74
parent 4ad483090edc45aaf971217779202976495b4bde
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Tue, 10 May 2022 16:50:52 -0500

fix(NIP-09): correct WHERE clause for event deletion

Diffstat:
Msrc/db.rs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/db.rs b/src/db.rs @@ -344,7 +344,7 @@ pub fn write_event(conn: &mut PooledConnection, e: &Event) -> Result<usize> { .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)?;