feat: adjust default relay configuration
This commit is contained in:
parent
e25902b8b4
commit
c60d7ab401
2 changed files with 15 additions and 17 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import LoginDialog from '@/components/LoginDialog'
|
||||
import { ApplicationDataKey, BIG_RELAY_URLS, ExtendedKind, NEW_USER_RELAY_LIST } from '@/constants'
|
||||
import { ApplicationDataKey, BIG_RELAY_URLS, ExtendedKind } from '@/constants'
|
||||
import {
|
||||
createDeletionRequestDraftEvent,
|
||||
createFollowListDraftEvent,
|
||||
|
|
@ -614,13 +614,14 @@ export function NostrProvider({ children }: { children: React.ReactNode }) {
|
|||
}
|
||||
|
||||
const setupNewUser = async (signer: ISigner) => {
|
||||
const relays = NEW_USER_RELAY_LIST.map((item) => item.url)
|
||||
await Promise.allSettled([
|
||||
client.publishEvent(relays, await signer.signEvent(createFollowListDraftEvent([]))),
|
||||
client.publishEvent(relays, await signer.signEvent(createMuteListDraftEvent([]))),
|
||||
client.publishEvent(BIG_RELAY_URLS, await signer.signEvent(createFollowListDraftEvent([]))),
|
||||
client.publishEvent(BIG_RELAY_URLS, await signer.signEvent(createMuteListDraftEvent([]))),
|
||||
client.publishEvent(
|
||||
relays.concat(BIG_RELAY_URLS),
|
||||
await signer.signEvent(createRelayListDraftEvent(NEW_USER_RELAY_LIST))
|
||||
BIG_RELAY_URLS,
|
||||
await signer.signEvent(
|
||||
createRelayListDraftEvent(BIG_RELAY_URLS.map((url) => ({ url, scope: 'both' })))
|
||||
)
|
||||
)
|
||||
])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue