diff --git a/ui/noogle/src/components/FilterGeneration.vue b/ui/noogle/src/components/FilterGeneration.vue index 802429d..a3e80ed 100644 --- a/ui/noogle/src/components/FilterGeneration.vue +++ b/ui/noogle/src/components/FilterGeneration.vue @@ -408,7 +408,7 @@ async function listen() { for (let profile of profiles){ - console.log(profile) + let name = profile === undefined ? "" : profile["profile"]["name"] let picture = profile === undefined ? "../assets/nostr-purple.svg" : profile["profile"]["picture"] @@ -416,6 +416,8 @@ async function listen() { let njumpurl = "https://njump.me/" + PublicKey.parse(profile["author"]).toBech32() let nostrudelurl = "https://nostrudel.ninja/#/n/" + profile["author"] + let isnip05valid = false + /* let p = profiles.find(record => record.author === evt.author.toHex()) let bech32id = evt.id.toBech32() @@ -435,6 +437,7 @@ async function listen() { items.push({ id: profile["author"], + isnip05valid: isnip05valid, event: profile, author: name, authorid: profile["author"], @@ -485,6 +488,30 @@ async function listen() { client.handleNotifications(handle); } +async function isnip05valid(profile){ + let isnip05valid = false + if (profile["profile"]["nip05"] !== undefined && profile["profile"]["nip05"] !== ""){ + try{ + let domain = profile["profile"]["nip05"].split('@')[1] + let user = profile["profile"]["nip05"].split('@')[0] + let checknip05url = "https://" + domain + "/.well-known/nostr.json?name=" + user + //console.log(checknip05url) + let response = await fetch(checknip05url); + let data = await response.json(); + let usernpub = data.names[user] + if (usernpub === profile["author"]){ + isnip05valid = true + } + } + catch (error){ + isnip05valid = false + } + + } + + return isnip05valid + +} async function addAllContentDVMs() { let relevant_dvms = [] @@ -1041,7 +1068,7 @@ const submitHandler = async () => {

- Curate your feed with pubkeys you love.

+ Curate your feed with pubkeys you love. And nothing else.

@@ -1353,6 +1381,8 @@ const submitHandler = async () => {
{{ result.event.profile.name }} + ({{result.event.profile.nip05 }}) +
diff --git a/ui/noogle/src/store.js b/ui/noogle/src/store.js index 2d386ca..81dba1c 100644 --- a/ui/noogle/src/store.js +++ b/ui/noogle/src/store.js @@ -29,8 +29,9 @@ const store = createStore({ results: [], profile_results: [], relays: ["wss://relay.damus.io", "wss://nos.lol", "wss://nostr.wine", - "wss://nostr.mom", "wss://nostr.oxtr.dev", "wss://relay.nostr.bg", + "wss://nostr.mom", "wss://nostr.oxtr.dev", "wss://pablof7z.nostr1.com", "wss://relay.nostr.net", "wss://140.f7z.io", + //"wss://relay.nostr.bg", ], } },