From 1af731ef6759b07834bdd00bf42b4195809c880d Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Fri, 9 May 2025 14:49:51 +0000
Subject: [PATCH] chore: Improve event fetchers functions
Signed-off-by: Awiteb
---
src/nostr_utils/mod.rs | 38 +++++++++++++++++---------------------
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/src/nostr_utils/mod.rs b/src/nostr_utils/mod.rs
index 90fc5eb..2f3f231 100644
--- a/src/nostr_utils/mod.rs
+++ b/src/nostr_utils/mod.rs
@@ -121,6 +121,16 @@ impl NostrClient {
Ok(result.success.into_iter().collect())
}
+ /// Fetches the first event matching the given filter, or None if no event
+ /// is found.
+ pub async fn fetch_event(&self, filter: Filter) -> N34Result