mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2025-07-29 07:48:27 -04:00
fix: id based sqlite query
Queries using the `id` field were failing after the refactor of removing hexranges.
This commit is contained in:
committed by
Greg Heartsfield
parent
5ad318e6e8
commit
af6d101c21
@@ -1016,7 +1016,8 @@ fn query_from_filter(f: &ReqFilter) -> (String, Vec<Box<dyn ToSql>>, Option<Stri
|
|||||||
let mut id_searches: Vec<String> = vec![];
|
let mut id_searches: Vec<String> = vec![];
|
||||||
for id in idvec {
|
for id in idvec {
|
||||||
id_searches.push("event_hash=?".to_owned());
|
id_searches.push("event_hash=?".to_owned());
|
||||||
params.push(Box::new(id.clone()));
|
let id_bin = hex::decode(id).ok();
|
||||||
|
params.push(Box::new(id_bin));
|
||||||
}
|
}
|
||||||
if idvec.is_empty() {
|
if idvec.is_empty() {
|
||||||
// if the ids list was empty, we should never return
|
// if the ids list was empty, we should never return
|
||||||
|
Reference in New Issue
Block a user