fix: use big relays when no read relays
This commit is contained in:
parent
a7eb203b8c
commit
d1b8b981dd
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ import { Filter } from 'nostr-tools'
|
|||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
import { useNostr } from './NostrProvider'
|
||||
import { useRelaySets } from './RelaySetsProvider'
|
||||
import { BIG_RELAY_URLS } from '@/constants'
|
||||
|
||||
type TFeedContext = {
|
||||
feedType: TFeedType
|
||||
|
|
@ -109,7 +110,7 @@ export function FeedProvider({ children }: { children: React.ReactNode }) {
|
|||
client.fetchRelayList(pubkey),
|
||||
client.fetchFollowings(pubkey)
|
||||
])
|
||||
setRelayUrls(relayList.read.slice(0, 4))
|
||||
setRelayUrls(relayList.read.concat(BIG_RELAY_URLS).slice(0, 4))
|
||||
setFilter({ authors: followings.includes(pubkey) ? followings : [...followings, pubkey] })
|
||||
setIsReady(true)
|
||||
storage.setFeedType(feedType)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue