From fc3f22eac2bb81823f170f61ba9d39baff76b933 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 26 Jan 2024 21:32:21 +0000 Subject: chore: upgrade rust-nostr v0.27.0 this is a contribution from jk (sectore) that I rebased and squashed into this commit. the tests were broken in the last few commits to rush out some fixes. this change may introduce more issues because of Relay.respond_standard_req. --- test_utils/src/relay.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test_utils/src/relay.rs') diff --git a/test_utils/src/relay.rs b/test_utils/src/relay.rs index 50f6337..e47ab5d 100644 --- a/test_utils/src/relay.rs +++ b/test_utils/src/relay.rs @@ -96,18 +96,25 @@ impl<'a> Relay<'a> { &self, client_id: u64, subscription_id: &nostr::SubscriptionId, - filters: &[nostr::Filter], + // TODO: enable filters + _filters: &[nostr::Filter], ) -> Result { // let t: Vec = self.events.iter().map(|e| e.kind).collect(); // .filter(|e| filters.iter().any(|filter| filter.match_event(e))) // println!("letsgo{:?}", t); + self.respond_events( client_id, subscription_id, &self .events .iter() - .filter(|e| filters.iter().any(|filter| filter.match_event(e))) + // FIXME: + // `filter.match_events` does not exist anymore + // it has been moved to `nostr_database_::FilterIndex` + // but it's private now + // .filter(|e| filters.iter().any(|filter|filter.match_event(e))) + .filter(|_| true) .cloned() .collect(), ) -- cgit v1.2.3