From 273058fe3f45525ab62d66de88838e5f95be4a36 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Mon, 5 May 2025 19:51:45 +0000
Subject: [PATCH] chore: A method to send an event builder
Signed-off-by: Awiteb
---
src/nostr_utils/mod.rs | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/nostr_utils/mod.rs b/src/nostr_utils/mod.rs
index 75eb758..efd33c7 100644
--- a/src/nostr_utils/mod.rs
+++ b/src/nostr_utils/mod.rs
@@ -22,13 +22,13 @@ pub mod utils;
use std::time::Duration;
use nostr::{
- event::Kind,
+ event::{EventBuilder, EventId, Kind},
filter::Filter,
key::Keys,
nips::{nip19::Nip19Coordinate, nip34::GitRepositoryAnnouncement},
types::RelayUrl,
};
-use nostr_sdk::Client;
+use nostr_sdk::{Client, pool::Output};
use crate::{
cli::CliOptions,
@@ -83,6 +83,22 @@ impl NostrClient {
}
}
+ /// Sends an event builder to the specified relays.
+ pub async fn send_builder_to(
+ &self,
+ builder: EventBuilder,
+ relays: &[RelayUrl],
+ ) -> N34Result