New release #275

Merged
b merged 92 commits from staging into main 2024-12-11 16:49:24 +00:00
Showing only changes of commit 7b29d7055e - Show all commits

View File

@ -251,10 +251,15 @@ export const CreatePage = () => {
} else {
// Otherwize if search already provided some results, user must manually click the search button
if (!foundUsers.length) {
// If it's NIP05 send request to .well-known
if (userSearchInput.includes('@')) {
// If it's NIP05 (includes @ or is a valid domain) send request to .well-known
const domainRegex = /^[a-zA-Z0-9@.-]+\.[a-zA-Z]{2,}$/
if (domainRegex.test(userSearchInput)) {
setSearchUsersLoading(true)
const pubkey = await handleSearchUserNip05(userSearchInput)
setSearchUsersLoading(false)
if (pubkey) {
setUserInput(userSearchInput)
} else {