feat: Events and naddrs can starts with nostr:

Suggested-by: DanConwayDev <DanConwayDev@protonmail.com>
Fixes: note1jwgfl095vuhduepxxpwhdqme0dnlhawzvcal0xnl0e6d82wx5jys5z92hj
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-05-27 10:48:33 +00:00
parent 15d834dc0f
commit 1abb8e3f36
2 changed files with 6 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ pub fn parse_nostr_address_file(file_path: &Path) -> N34Result<Vec<Nip19Coordina
/// Returns an error for invalid formats, failed bech32 decoding, wrong event
/// kind.
pub fn repo_naddr(repo: &str) -> Result<Nip19Coordinate, String> {
let repo = repo.trim();
let repo = repo.trim().trim_start_matches("nostr:");
if repo.contains("/") {
let (nip5, repo_id) = repo.split_once("/").expect("There is a `/`");