Skip to content

Commit 9216578

Browse files
committed
fix: nip05 search
1 parent 017f2df commit 9216578

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "astral",
3-
"version": "0.0.23",
3+
"version": "0.0.24",
44
"description": "decentralized social platform (nostr client)",
55
"productName": "astral",
66
"author": "monica <[email protected]>",

src/components/TheSearchMenu.vue

+4-5
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ export default defineComponent({
163163
}
164164
165165
this.searching = true
166-
this.searchingProfile = this.searchingProfile.trim().toLowerCase()
166+
this.searchingProfile = this.searchingProfile.trim()
167167
168-
if (this.searchingProfile.match(/^[a-f0-9]{64}$/)) {
169-
this.toProfile(this.searchingProfile)
168+
if (this.searchingProfile.match(/^[a-fA-F0-9]{64}$/)) {
169+
this.toProfile(this.searchingProfile.toLowerCase())
170170
this.searchingProfile = ''
171171
this.searching = false
172172
return
@@ -181,7 +181,7 @@ export default defineComponent({
181181
return
182182
}
183183
184-
if (this.searchingProfile.match(/^([a-z0-9-_.\u00C0-\u1FFF\u2800-\uFFFD]*@)?[a-z0-9-_.]+[.]{1}[a-z0-9-_.]+$/)) {
184+
if (this.searchingProfile.match(/^([a-zA-Z0-9-_.\u00C0-\u1FFF\u2800-\uFFFD]*@)?[a-zA-Z0-9-_.]+[.]{1}[a-zA-Z0-9-_.]+$/)) {
185185
if (this.searchingProfile.match(/^@/) || !this.searchingProfile.match(/@/)) {
186186
this.domainNames = await nip05.searchDomain(this.domain)
187187
if (this.domainUsers.length || this.domainDefaultPubkey) {
@@ -192,7 +192,6 @@ export default defineComponent({
192192
return
193193
}
194194
} else {
195-
console.log('this.domainUsers', this.domainUsers)
196195
let {pubkey} = await nip05.queryProfile(this.searchingProfile)
197196
if (pubkey) {
198197
this.toProfile(pubkey)

0 commit comments

Comments
 (0)