fix: case insensitive name match
This commit is contained in:
parent
f2a9b1ff9c
commit
2acbe37907
@ -12,9 +12,10 @@ function fetchNip05Pubkey(name, domain) {
|
|||||||
return fetch(`https://${domain}/.well-known/nostr.json?name=${encodeURIComponent(name)}`)
|
return fetch(`https://${domain}/.well-known/nostr.json?name=${encodeURIComponent(name)}`)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then(({ names }) => {
|
.then(({ names }) => {
|
||||||
if (names && names[name]) {
|
const match = Object.keys(names).find(n => {
|
||||||
return names[name]
|
return n.toLowerCase() === name.toLowerCase()
|
||||||
}
|
})
|
||||||
|
return names[match]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user