From d889b890f9e63815c178853ed98a1e31f6cec7f8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 May 2026 15:32:38 +0530 Subject: Fix compile issues for NIP-46 build - nip46.rs: match on owned RelayPoolNotification (not .as_ref()) - git_mirror.rs: accept shared nostr_sdk::Client for state event publishing - main.rs: pass nostr_client to mirror_repo_to_servers - NIP46-PLAN.md: full implementation checklist and roadmap - PLAN.md: updated --- src/git_mirror.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/git_mirror.rs') diff --git a/src/git_mirror.rs b/src/git_mirror.rs index c486887..cdf853e 100644 --- a/src/git_mirror.rs +++ b/src/git_mirror.rs @@ -31,6 +31,7 @@ impl GitMirror { repo: &DiscoveredRepo, target_servers: &[GraspServer], nip46_client: Option<&Arc>, + nostr_client: &nostr_sdk::Client, ) -> Result<()> { if target_servers.is_empty() { tracing::debug!( @@ -80,17 +81,6 @@ impl GitMirror { let relay_url = server.relay_url(); if let Ok(url) = RelayUrl::parse(&relay_url) { let urls = vec![url]; - if let Err(e) = nip46_client - .map_or(Ok(()), |_| { - Err(anyhow::anyhow!("need nostr client to send state event")) - }) - { - let _ = e; - } - - let nostr_client = nostr_sdk::Client::default(); - let _ = nostr_client.add_relay(&relay_url).await; - nostr_client.connect().await; if let Err(e) = nostr_client.send_event_to(urls, event.clone()).await { tracing::warn!( server = %server.domain, -- cgit v1.2.3