diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-09 15:35:18 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-09 15:35:18 +0000 |
| commit | d8f4f7641312bff32f772cbc070b3f99ced0c8fe (patch) | |
| tree | 0ca4db7b41d7c191eb91ceb1c8124b5e659a3566 /src/lib/login/mod.rs | |
| parent | f0d0e1ba1cba11d3a98a5ab0c7f1dc72b6bc4e17 (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/mod.rs')
| -rw-r--r-- | src/lib/login/mod.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/login/mod.rs b/src/lib/login/mod.rs index 00dbb17..0be1e5d 100644 --- a/src/lib/login/mod.rs +++ b/src/lib/login/mod.rs | |||
| @@ -24,9 +24,19 @@ pub async fn login_or_signup( | |||
| 24 | password: &Option<String>, | 24 | password: &Option<String>, |
| 25 | #[cfg(test)] client: Option<&MockConnect>, | 25 | #[cfg(test)] client: Option<&MockConnect>, |
| 26 | #[cfg(not(test))] client: Option<&Client>, | 26 | #[cfg(not(test))] client: Option<&Client>, |
| 27 | fetch_profile_updates: bool, | ||
| 27 | ) -> Result<(Arc<dyn NostrSigner>, UserRef, SignerInfoSource)> { | 28 | ) -> Result<(Arc<dyn NostrSigner>, UserRef, SignerInfoSource)> { |
| 28 | let res = | 29 | let res = load_existing_login( |
| 29 | load_existing_login(git_repo, signer_info, password, &None, client, false, true).await; | 30 | git_repo, |
| 31 | signer_info, | ||
| 32 | password, | ||
| 33 | &None, | ||
| 34 | client, | ||
| 35 | false, | ||
| 36 | true, | ||
| 37 | fetch_profile_updates, | ||
| 38 | ) | ||
| 39 | .await; | ||
| 30 | if res.is_ok() { | 40 | if res.is_ok() { |
| 31 | res | 41 | res |
| 32 | } else { | 42 | } else { |