From 483e8e85d674ebb8a0ed29f4fb7abaec503857da Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 12 Apr 2024 20:29:41 -0700 Subject: [PATCH] fix until filters Signed-off-by: William Casarin --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/filter.rs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6709ba4..7964da5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2556,9 +2556,9 @@ dependencies = [ [[package]] name = "nostrdb" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59da521fefb12cd1f1f0f26d15a2ab9f38860696f6c0bb674b9830a5bbc75990" +checksum = "a4d574f011d7bca4fcb7167da332da7a73d5612b24a187df08f5a000de08d3f4" dependencies = [ "bindgen", "cc", diff --git a/Cargo.toml b/Cargo.toml index 8d2cabf..2c7d5be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ env_logger = "0.10.0" puffin_egui = { version = "0.27.0", optional = true } puffin = { version = "0.19.0", optional = true } #nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "2675e7244554e40c9ee10d82b42bc647fef4c17d" } -nostrdb = "0.3.0" +nostrdb = "0.3.2" hex = "0.4.3" base32 = "0.4.0" nostr-sdk = "0.29.0" diff --git a/src/filter.rs b/src/filter.rs index c996d3e..b7b2db9 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -33,6 +33,10 @@ pub fn convert_enostr_filter(filter: &enostr::Filter) -> nostrdb::Filter { nfilter.since(since); } + if let Some(until) = filter.until { + nfilter.until(until); + } + if let Some(limit) = filter.limit { nfilter.limit(limit.into()); }