From d5058d11caad038fca493c988ff173d30de07672 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 26 Jan 2024 20:04:20 +0000 Subject: feat(claim): add blaster to relay list this is a temporary fix until we handle relays more effectively --- src/sub_commands/claim.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/sub_commands/claim.rs b/src/sub_commands/claim.rs index 984fab0..ce39a64 100644 --- a/src/sub_commands/claim.rs +++ b/src/sub_commands/claim.rs @@ -73,7 +73,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { let mut maintainers = vec![keys.public_key()]; - let repo_relays: Vec = if !args.relays.is_empty() { + let mut repo_relays: Vec = if !args.relays.is_empty() { args.relays.clone() } else if let Ok(config) = &repo_config_result { config.relays.clone() @@ -84,6 +84,16 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { user_ref.relays.write() }; + // TODO: add blaster for just repo event and don't add it to repo relays + // TODO: fix the tests to support blaster + if std::env::var("NGITTEST").is_err() + && !repo_relays + .iter() + .any(|s| s.contains("nostr.mutinywallet.com")) + { + repo_relays.push("wss://nostr.mutinywallet.com".to_string()); + } + if let Ok(config) = &repo_config_result { maintainers = extract_pks(config.maintainers.clone())?; } @@ -119,7 +129,6 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { } .to_event(&keys)?; - // TODO: send repo event to blaster send_events( &client, vec![repo_event], -- cgit v1.2.3