chore: Add the relays for read and write

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-05-06 12:15:12 +00:00
parent c0a5e47793
commit 93c8743dc7
3 changed files with 11 additions and 13 deletions

View File

@@ -72,6 +72,8 @@ impl CommandRunner for AnnounceArgs {
let mut write_relays = options.relays.clone();
let mut maintainers = vec![user_pubk];
write_relays.sort_unstable();
write_relays.dedup();
maintainers.extend(self.maintainers);
if let Some(event) = relays_list.clone() {
@@ -99,7 +101,7 @@ impl CommandRunner for AnnounceArgs {
let result = client
.send_event_to(event, relays_list.as_ref(), write_relays)
.send_event_to(event, relays_list.as_ref(), &write_relays)
.await?;
for relay in &result.success {

View File

@@ -37,7 +37,7 @@ impl CommandRunner for ViewArgs {
async fn run(self, options: CliOptions) -> N34Result<()> {
let client = NostrClient::init(&options).await;
if !self.naddr.relays.is_empty() {
client.add_read_relays(&self.naddr.relays).await;
client.add_relays(&self.naddr.relays).await;
}
let repo = client.fetch_repo(&self.naddr).await?;