upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/login/existing.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-12-09 15:35:18 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-12-09 15:35:18 +0000
commitd8f4f7641312bff32f772cbc070b3f99ced0c8fe (patch)
tree0ca4db7b41d7c191eb91ceb1c8124b5e659a3566 /src/lib/login/existing.rs
parentf0d0e1ba1cba11d3a98a5ab0c7f1dc72b6bc4e17 (diff)
fix: fetch user relays for `send`,`push` & `init`
get the latest user relay list before pushing patches and repo announcement events
Diffstat (limited to 'src/lib/login/existing.rs')
-rw-r--r--src/lib/login/existing.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/login/existing.rs b/src/lib/login/existing.rs
index 45727b0..4606c22 100644
--- a/src/lib/login/existing.rs
+++ b/src/lib/login/existing.rs
@@ -27,6 +27,7 @@ use crate::{
27/// - `client`: include client to fetch profiles from relays that are missing 27/// - `client`: include client to fetch profiles from relays that are missing
28/// from cache 28/// from cache
29/// - `silent`: do not print outcome in termianl 29/// - `silent`: do not print outcome in termianl
30#[allow(clippy::too_many_arguments)]
30pub async fn load_existing_login( 31pub async fn load_existing_login(
31 git_repo: &Option<&Repo>, 32 git_repo: &Option<&Repo>,
32 signer_info: &Option<SignerInfo>, 33 signer_info: &Option<SignerInfo>,
@@ -36,6 +37,7 @@ pub async fn load_existing_login(
36 #[cfg(not(test))] client: Option<&Client>, 37 #[cfg(not(test))] client: Option<&Client>,
37 silent: bool, 38 silent: bool,
38 prompt_for_password: bool, 39 prompt_for_password: bool,
40 fetch_profile_updates: bool,
39) -> Result<(Arc<dyn NostrSigner>, UserRef, SignerInfoSource)> { 41) -> Result<(Arc<dyn NostrSigner>, UserRef, SignerInfoSource)> {
40 let (signer_info, source) = get_signer_info(git_repo, signer_info, password, source)?; 42 let (signer_info, source) = get_signer_info(git_repo, signer_info, password, source)?;
41 43
@@ -50,6 +52,7 @@ pub async fn load_existing_login(
50 None 52 None
51 }, 53 },
52 silent, 54 silent,
55 fetch_profile_updates,
53 ) 56 )
54 .await?; 57 .await?;
55 58