fix: 🐛

This commit is contained in:
codytseng
2025-02-10 00:05:42 +08:00
parent 9a643a09ab
commit a555293e2f
2 changed files with 7 additions and 3 deletions

View File

@@ -71,8 +71,12 @@ export default function NoteList({
setNewEvents([])
setHasMore(true)
const relayInfos = await client.fetchRelayInfos(relayUrls)
const areAlgoRelays = relayInfos.every((relayInfo) => checkAlgoRelay(relayInfo))
let areAlgoRelays = false
// if no authors, check if all relays are algo relays
if (!noteFilter.authors?.length) {
const relayInfos = await client.fetchRelayInfos(relayUrls)
areAlgoRelays = relayInfos.every((relayInfo) => checkAlgoRelay(relayInfo))
}
const filter = areAlgoRelays ? { ...noteFilter, limit: ALGO_RELAY_LIMIT } : noteFilter
let eventCount = 0