diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-14 13:47:11 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-14 13:47:11 +0000 |
| commit | a1d67c50c8ebc5395b069e30b60d66e0c7de5a5a (patch) | |
| tree | 0895e4cfab98e7c7bbf45ddbac2e7af2c51935e6 /src/sub_commands/init.rs | |
| parent | fed60687b2438b6bd19ee8f5c854ddc53cad0c9b (diff) | |
feat: send to default relays, blast repo event
improve the distribution of events by sending to default relays
in addition to user and repo relays. for better discoverability of
repo events, this is also blasted.
a temporary fix to blast everything was removed.
the less reliable purplepages.es relay is moved to
more_fallback_relays that currently isn't used
Diffstat (limited to 'src/sub_commands/init.rs')
| -rw-r--r-- | src/sub_commands/init.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/sub_commands/init.rs b/src/sub_commands/init.rs index a95021d..9fdcca5 100644 --- a/src/sub_commands/init.rs +++ b/src/sub_commands/init.rs | |||
| @@ -81,7 +81,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 81 | 81 | ||
| 82 | let mut maintainers = vec![keys.public_key()]; | 82 | let mut maintainers = vec![keys.public_key()]; |
| 83 | 83 | ||
| 84 | let mut repo_relays: Vec<String> = if !args.relays.is_empty() { | 84 | let repo_relays: Vec<String> = if !args.relays.is_empty() { |
| 85 | args.relays.clone() | 85 | args.relays.clone() |
| 86 | } else if let Ok(config) = &repo_config_result { | 86 | } else if let Ok(config) = &repo_config_result { |
| 87 | config.relays.clone() | 87 | config.relays.clone() |
| @@ -92,16 +92,6 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 92 | user_ref.relays.write() | 92 | user_ref.relays.write() |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | // TODO: add blaster for just repo event and don't add it to repo relays | ||
| 96 | // TODO: fix the tests to support blaster | ||
| 97 | if std::env::var("NGITTEST").is_err() | ||
| 98 | && !repo_relays | ||
| 99 | .iter() | ||
| 100 | .any(|s| s.contains("nostr.mutinywallet.com")) | ||
| 101 | { | ||
| 102 | repo_relays.push("wss://nostr.mutinywallet.com".to_string()); | ||
| 103 | } | ||
| 104 | |||
| 105 | if let Ok(config) = &repo_config_result { | 95 | if let Ok(config) = &repo_config_result { |
| 106 | maintainers = extract_pks(config.maintainers.clone())?; | 96 | maintainers = extract_pks(config.maintainers.clone())?; |
| 107 | } | 97 | } |