From d8f4f7641312bff32f772cbc070b3f99ced0c8fe Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 9 Dec 2024 15:35:18 +0000 Subject: fix: fetch user relays for `send`,`push` & `init` get the latest user relay list before pushing patches and repo announcement events --- src/bin/ngit/sub_commands/export_keys.rs | 1 + src/bin/ngit/sub_commands/init.rs | 1 + src/bin/ngit/sub_commands/login.rs | 13 +++++++++++-- src/bin/ngit/sub_commands/logout.rs | 13 +++++++++++-- src/bin/ngit/sub_commands/send.rs | 1 + 5 files changed, 25 insertions(+), 4 deletions(-) (limited to 'src/bin/ngit') diff --git a/src/bin/ngit/sub_commands/export_keys.rs b/src/bin/ngit/sub_commands/export_keys.rs index 12fc380..54a716f 100644 --- a/src/bin/ngit/sub_commands/export_keys.rs +++ b/src/bin/ngit/sub_commands/export_keys.rs @@ -28,6 +28,7 @@ pub async fn launch() -> Result<()> { None, true, false, + false, ) .await { diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index 6fc1ec4..7ed98f5 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs @@ -84,6 +84,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { &extract_signer_cli_arguments(cli_args).unwrap_or(None), &cli_args.password, Some(&client), + true, ) .await?; diff --git a/src/bin/ngit/sub_commands/login.rs b/src/bin/ngit/sub_commands/login.rs index 7670bc3..ccbdf01 100644 --- a/src/bin/ngit/sub_commands/login.rs +++ b/src/bin/ngit/sub_commands/login.rs @@ -64,8 +64,17 @@ async fn logout(git_repo: Option<&Repo>, local_only: bool) -> Result<(bool, bool } else { vec![SignerInfoSource::GitLocal, SignerInfoSource::GitGlobal] } { - if let Ok((_, user_ref, source)) = - load_existing_login(&git_repo, &None, &None, &Some(source), None, true, false).await + if let Ok((_, user_ref, source)) = load_existing_login( + &git_repo, + &None, + &None, + &Some(source), + None, + true, + false, + false, + ) + .await { match Interactor::default().choice( PromptChoiceParms::default() diff --git a/src/bin/ngit/sub_commands/logout.rs b/src/bin/ngit/sub_commands/logout.rs index 682c017..f3f9620 100644 --- a/src/bin/ngit/sub_commands/logout.rs +++ b/src/bin/ngit/sub_commands/logout.rs @@ -26,8 +26,17 @@ async fn logout(git_repo: Option<&Repo>) -> Result<()> { } else { vec![SignerInfoSource::GitLocal, SignerInfoSource::GitGlobal] } { - if let Ok((_, user_ref, source)) = - load_existing_login(&git_repo, &None, &None, &Some(source), None, true, false).await + if let Ok((_, user_ref, source)) = load_existing_login( + &git_repo, + &None, + &None, + &Some(source), + None, + true, + false, + false, + ) + .await { for item in [ "nostr.nsec", diff --git a/src/bin/ngit/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs index e19c38b..c6c75c9 100644 --- a/src/bin/ngit/sub_commands/send.rs +++ b/src/bin/ngit/sub_commands/send.rs @@ -181,6 +181,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Re &extract_signer_cli_arguments(cli_args).unwrap_or(None), &cli_args.password, Some(&client), + true, ) .await?; -- cgit v1.2.3