fix: author filter in SQLite queries use correct blob type

https://todo.sr.ht/~gheartsfield/nostr-rs-relay/79
Signed-off-by: Greg Heartsfield <scsibug@imap.cc>
This commit is contained in:
Laszlo Megyer 2024-03-24 20:54:12 +00:00 committed by Greg Heartsfield
parent c5fb16cd98
commit 767b76b2b3

View File

@ -993,7 +993,8 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec<Box<dyn ToSql>>, Option<Stri
let mut auth_searches: Vec<String> = 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 "));