diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-20 09:25:02 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-20 09:25:02 +0000 |
| commit | f3a6ae82ccee44dc3b66a66caafe1bb39e7a46a6 (patch) | |
| tree | cfb5d888747d9909409045e071d8692f84104c3c /src/lib/fetch.rs | |
| parent | 3daf61e74c8969c91333bc92c4914c8c6077592c (diff) | |
fix(client): panic cloning bare npub nostr:// URL with no relay hints
When cloning a nostr:// URL containing only an npub and identifier (no
relay hints), and nothing is cached yet, the relay set was empty because
fallback relays were intentionally skipped when a coordinate was present.
This caused an unwrap() on a None from reduce() over an empty iterator.
Fall back to fallback relays when the coordinate-derived relay set is
still empty after processing all hints, and replace unwrap() with
map_or() as a defensive guard.
Diffstat (limited to 'src/lib/fetch.rs')
0 files changed, 0 insertions, 0 deletions