fix: include purplepage and userkindpages relays when searching for user in create page
Some checks failed
Open PR on Staging / audit_and_check (pull_request) Failing after 30s

This commit is contained in:
Stixx 2024-12-02 11:51:02 +01:00
parent 52f8b92c5d
commit 8a9910db87
4 changed files with 18 additions and 9 deletions

8
package-lock.json generated
View File

@ -32,7 +32,7 @@
"jszip": "3.10.1", "jszip": "3.10.1",
"lodash": "4.17.21", "lodash": "4.17.21",
"mui-file-input": "4.0.4", "mui-file-input": "4.0.4",
"nostr-login": "^1.6.6", "nostr-login": "file:../../nostrdev-com/nostr-login/packages/auth/dist/nostr-login-1.6.12.tgz",
"nostr-tools": "2.7.0", "nostr-tools": "2.7.0",
"pdf-lib": "^1.17.1", "pdf-lib": "^1.17.1",
"pdfjs-dist": "^4.4.168", "pdfjs-dist": "^4.4.168",
@ -6415,9 +6415,9 @@
} }
}, },
"node_modules/nostr-login": { "node_modules/nostr-login": {
"version": "1.6.6", "version": "1.6.12",
"resolved": "https://registry.npmjs.org/nostr-login/-/nostr-login-1.6.6.tgz", "resolved": "file:../../nostrdev-com/nostr-login/packages/auth/dist/nostr-login-1.6.12.tgz",
"integrity": "sha512-XOpB9nG3Qgt7iea7gA1zn4TaTfUKCKGdCHKwErqLPtMk/q1Rhkzj5cq/66iU0WqC6mSiwENfTy1p4qaM7HzMtg==", "integrity": "sha512-7qqhWSrA3Hr/An2+s7JIr1HhIpOsdwfNRgKBctPLrfjIQbiMYQd8/S25Pvv20s09yA/tS8zPgWYUUdeKoPDDNg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@nostr-dev-kit/ndk": "^2.3.1", "@nostr-dev-kit/ndk": "^2.3.1",

View File

@ -42,7 +42,7 @@
"jszip": "3.10.1", "jszip": "3.10.1",
"lodash": "4.17.21", "lodash": "4.17.21",
"mui-file-input": "4.0.4", "mui-file-input": "4.0.4",
"nostr-login": "^1.6.6", "nostr-login": "file:../../nostrdev-com/nostr-login/packages/auth/dist/nostr-login-1.6.12.tgz",
"nostr-tools": "2.7.0", "nostr-tools": "2.7.0",
"pdf-lib": "^1.17.1", "pdf-lib": "^1.17.1",
"pdfjs-dist": "^4.4.168", "pdfjs-dist": "^4.4.168",

View File

@ -52,7 +52,8 @@ import {
updateUsersAppData, updateUsersAppData,
uploadToFileStorage, uploadToFileStorage,
DEFAULT_TOOLBOX, DEFAULT_TOOLBOX,
settleAllFullfilfedPromises settleAllFullfilfedPromises,
DEFAULT_LOOK_UP_RELAY_LIST
} from '../../utils' } from '../../utils'
import { Container } from '../../components/Container' import { Container } from '../../components/Container'
import fileListStyles from '../../components/FileList/style.module.scss' import fileListStyles from '../../components/FileList/style.module.scss'
@ -159,6 +160,14 @@ export const CreatePage = () => {
const metadataController = MetadataController.getInstance() const metadataController = MetadataController.getInstance()
const relaySet = await metadataController.findRelayListMetadata(usersPubkey) const relaySet = await metadataController.findRelayListMetadata(usersPubkey)
DEFAULT_LOOK_UP_RELAY_LIST.forEach((relay) => {
if (!relaySet.write.includes(relay)) relaySet.write.push(relay)
if (!relaySet.read.includes(relay)) relaySet.read.push(relay)
})
const uniqueReadRelaySet = [...new Set(relaySet.read)]
const searchTerm = searchString.trim() const searchTerm = searchString.trim()
relayController relayController
@ -167,7 +176,7 @@ export const CreatePage = () => {
kinds: [0], kinds: [0],
search: searchTerm search: searchTerm
}, },
[...relaySet.write] uniqueReadRelaySet
) )
.then((events) => { .then((events) => {
console.log('events', events) console.log('events', events)

View File

@ -80,8 +80,8 @@ const getUserRelaySet = (tags: string[][]): RelaySet => {
} }
const getDefaultRelaySet = (): RelaySet => ({ const getDefaultRelaySet = (): RelaySet => ({
read: [SIGIT_RELAY], read: DEFAULT_LOOK_UP_RELAY_LIST,
write: [SIGIT_RELAY] write: DEFAULT_LOOK_UP_RELAY_LIST
}) })
const getDefaultRelayMap = (): RelayMap => ({ const getDefaultRelayMap = (): RelayMap => ({