Skip to content

Commit

Permalink
Check for empty name
Browse files Browse the repository at this point in the history
  • Loading branch information
dcadenas committed Aug 22, 2024
1 parent 97fab2c commit a8986e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fetch_friendly_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ pub async fn fetch_friendly_id(
return npub_or_pubkey;
};

let name_or_npub_or_pubkey = metadata.name.unwrap_or(npub_or_pubkey);
let name_or_npub_or_pubkey = metadata
.name
.filter(|name| !name.is_empty())
.unwrap_or(npub_or_pubkey);

if let Some(nip05_value) = metadata.nip05 {
if verify {
Expand Down

0 comments on commit a8986e7

Please sign in to comment.