diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-31 16:47:31 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-31 16:47:31 +0100 |
| commit | a7cabb96df30cd5d26f63affdb023b0706a387d1 (patch) | |
| tree | 53c086492fd710f9f289c756ec511f8b3d3819f3 /src/lib/git/nostr_url.rs | |
| parent | b1eabeb315dba8860f34c92e0e362559d3352ef7 (diff) | |
| parent | 436ff29135e3deade80a6e53e53d74dddb613481 (diff) | |
Merge branch 'rust-nostr-v0.43'
Diffstat (limited to 'src/lib/git/nostr_url.rs')
| -rw-r--r-- | src/lib/git/nostr_url.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/git/nostr_url.rs b/src/lib/git/nostr_url.rs index e9b482f..5e92a84 100644 --- a/src/lib/git/nostr_url.rs +++ b/src/lib/git/nostr_url.rs | |||
| @@ -2,10 +2,11 @@ use core::fmt; | |||
| 2 | use std::{collections::HashMap, str::FromStr}; | 2 | use std::{collections::HashMap, str::FromStr}; |
| 3 | 3 | ||
| 4 | use anyhow::{Context, Error, Result, anyhow, bail}; | 4 | use anyhow::{Context, Error, Result, anyhow, bail}; |
| 5 | use nostr::nips::{nip01::Coordinate, nip05, nip19::Nip19Coordinate}; | 5 | use nostr::nips::{nip01::Coordinate, nip19::Nip19Coordinate}; |
| 6 | use nostr_sdk::{FromBech32, PublicKey, RelayUrl, ToBech32, Url}; | 6 | use nostr_sdk::{FromBech32, PublicKey, RelayUrl, ToBech32, Url}; |
| 7 | 7 | ||
| 8 | use super::{Repo, get_git_config_item, save_git_config_item}; | 8 | use super::{Repo, get_git_config_item, save_git_config_item}; |
| 9 | use crate::client::nip05_query; | ||
| 9 | 10 | ||
| 10 | #[derive(Debug, PartialEq, Default, Clone)] | 11 | #[derive(Debug, PartialEq, Default, Clone)] |
| 11 | pub enum ServerProtocol { | 12 | pub enum ServerProtocol { |
| @@ -206,7 +207,7 @@ impl NostrUrlDecoded { | |||
| 206 | if s.len() == 2 { s[1] } else { s[0] } | 207 | if s.len() == 2 { s[1] } else { s[0] } |
| 207 | }; | 208 | }; |
| 208 | term.write_line(&format!("fetching pubic key info from {domain}..."))?; | 209 | term.write_line(&format!("fetching pubic key info from {domain}..."))?; |
| 209 | let res = nip05::profile(npub_or_nip05, None).await.context(format!( | 210 | let res = nip05_query(npub_or_nip05).await.context(format!( |
| 210 | "failed to get nostr public key for {npub_or_nip05} from {domain}" | 211 | "failed to get nostr public key for {npub_or_nip05} from {domain}" |
| 211 | ))?; | 212 | ))?; |
| 212 | term.clear_last_lines(1)?; | 213 | term.clear_last_lines(1)?; |