diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-11 09:20:48 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-11 15:54:51 +0000 |
| commit | 15bf0d0b6befae6c81631c0e5d0dc2947dd3318a (patch) | |
| tree | 3d12d8b104c7a36ac8d2a7194da26fb432c95f23 /src/lib/login/user.rs | |
| parent | 459d33b6d7d3e5fdd55780670cd05d8141e670ac (diff) | |
feat: use fallback relays for bootstrapping only
- Add --relay flag to 'ngit account create' allowing users to specify
relay URLs (repeatable). Defaults to relay-default-set when not provided.
- Remove fallback relays from fetch when repo context exists (repo
coordinate provided). Only use them for bootstrapping (profile discovery
with no repo context).
- Remove fallback relays from publish when repo or user relays exist.
Only use them when neither is available (e.g. new account signup).
- Update --customize help text to reflect new relay-default-set behavior.
Diffstat (limited to 'src/lib/login/user.rs')
| -rw-r--r-- | src/lib/login/user.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/login/user.rs b/src/lib/login/user.rs index 0b702ef..b273363 100644 --- a/src/lib/login/user.rs +++ b/src/lib/login/user.rs | |||
| @@ -113,6 +113,8 @@ pub async fn get_user_details( | |||
| 113 | } | 113 | } |
| 114 | Ok(user_ref) | 114 | Ok(user_ref) |
| 115 | } else { | 115 | } else { |
| 116 | // No cached profile found. Fall back to fetching from default relays | ||
| 117 | // (bootstrapping). | ||
| 116 | let empty = UserRef { | 118 | let empty = UserRef { |
| 117 | public_key: public_key.to_owned(), | 119 | public_key: public_key.to_owned(), |
| 118 | metadata: extract_user_metadata(public_key, &[])?, | 120 | metadata: extract_user_metadata(public_key, &[])?, |