From 767b76b2b3022c7eb13f8a01987d7bd22ce86c9d Mon Sep 17 00:00:00 2001 From: Laszlo Megyer Date: Sun, 24 Mar 2024 20:54:12 +0000 Subject: [PATCH] fix: author filter in SQLite queries use correct blob type https://todo.sr.ht/~gheartsfield/nostr-rs-relay/79 Signed-off-by: Greg Heartsfield --- src/repo/sqlite.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/repo/sqlite.rs b/src/repo/sqlite.rs index e12ae8e..b8dda5b 100644 --- a/src/repo/sqlite.rs +++ b/src/repo/sqlite.rs @@ -993,7 +993,8 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec>, Option = vec![]; for auth in authvec { auth_searches.push("author=?".to_owned()); - params.push(Box::new(auth.clone())); + let auth_bin = hex::decode(&auth).ok(); + params.push(Box::new(auth_bin)); } if !authvec.is_empty() { let auth_clause = format!("({})", auth_searches.join(" OR "));