diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-01-26 20:04:20 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-01-26 20:04:20 +0000 |
| commit | d5058d11caad038fca493c988ff173d30de07672 (patch) | |
| tree | 9b4aab51456ad15c28e81e61906b315fbfcb6615 /src/sub_commands/claim.rs | |
| parent | f212788263e39a6473c3a109a5eaf5b0bf8cd034 (diff) | |
feat(claim): add blaster to relay list
this is a temporary fix until we handle relays more effectively
Diffstat (limited to 'src/sub_commands/claim.rs')
| -rw-r--r-- | src/sub_commands/claim.rs | 13 |
1 files 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<()> { | |||
| 73 | 73 | ||
| 74 | let mut maintainers = vec![keys.public_key()]; | 74 | let mut maintainers = vec![keys.public_key()]; |
| 75 | 75 | ||
| 76 | let repo_relays: Vec<String> = if !args.relays.is_empty() { | 76 | let mut repo_relays: Vec<String> = if !args.relays.is_empty() { |
| 77 | args.relays.clone() | 77 | args.relays.clone() |
| 78 | } else if let Ok(config) = &repo_config_result { | 78 | } else if let Ok(config) = &repo_config_result { |
| 79 | config.relays.clone() | 79 | config.relays.clone() |
| @@ -84,6 +84,16 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 84 | user_ref.relays.write() | 84 | user_ref.relays.write() |
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | // TODO: add blaster for just repo event and don't add it to repo relays | ||
| 88 | // TODO: fix the tests to support blaster | ||
| 89 | if std::env::var("NGITTEST").is_err() | ||
| 90 | && !repo_relays | ||
| 91 | .iter() | ||
| 92 | .any(|s| s.contains("nostr.mutinywallet.com")) | ||
| 93 | { | ||
| 94 | repo_relays.push("wss://nostr.mutinywallet.com".to_string()); | ||
| 95 | } | ||
| 96 | |||
| 87 | if let Ok(config) = &repo_config_result { | 97 | if let Ok(config) = &repo_config_result { |
| 88 | maintainers = extract_pks(config.maintainers.clone())?; | 98 | maintainers = extract_pks(config.maintainers.clone())?; |
| 89 | } | 99 | } |
| @@ -119,7 +129,6 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 119 | } | 129 | } |
| 120 | .to_event(&keys)?; | 130 | .to_event(&keys)?; |
| 121 | 131 | ||
| 122 | // TODO: send repo event to blaster | ||
| 123 | send_events( | 132 | send_events( |
| 124 | &client, | 133 | &client, |
| 125 | vec![repo_event], | 134 | vec![repo_event], |