mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
nip05 more strict. enforce the presence of "_" for domain names.
This commit is contained in:
6
nip05.js
6
nip05.js
@@ -15,11 +15,7 @@ export async function searchDomain(domain, query = '') {
|
||||
export async function queryName(fullname) {
|
||||
try {
|
||||
let [name, domain] = fullname.split('@')
|
||||
|
||||
if (!domain) {
|
||||
domain = name
|
||||
name = '_'
|
||||
}
|
||||
if (!domain) return null
|
||||
|
||||
let res = await (
|
||||
await fetch(`https://${domain}/.well-known/nostr.json?name=${name}`)
|
||||
|
||||
Reference in New Issue
Block a user