Skip to content

Commit

Permalink
fix: author filter in SQLite queries use correct blob type
Browse files Browse the repository at this point in the history
https://todo.sr.ht/~gheartsfield/nostr-rs-relay/79
Signed-off-by: Greg Heartsfield <scsibug@imap.cc>
  • Loading branch information
Laszlo Megyer authored and scsibug committed Mar 28, 2024
1 parent c5fb16c commit 767b76b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/repo/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 "));
Expand Down

0 comments on commit 767b76b

Please sign in to comment.