Use new relay getters

This commit is contained in:
Jon Staab
2025-04-25 10:41:38 -07:00
parent c18b29e7d6
commit da2457da9f
6 changed files with 17 additions and 24 deletions
+2 -2
View File
@@ -25,6 +25,7 @@ import {
getTagValue,
getAddress,
isShareableRelayUrl,
getRelaysFromList,
} from "@welshman/util"
import type {TrustedEvent, Filter, List} from "@welshman/util"
import {feedFromFilters, makeRelayFeed, makeIntersectionFeed} from "@welshman/feeds"
@@ -41,7 +42,6 @@ import {
loadFollows,
loadProfile,
loadInboxRelaySelections,
getRelayUrls,
} from "@welshman/app"
import {createScroller} from "@lib/html"
import {daysBetween} from "@lib/util"
@@ -421,7 +421,7 @@ export const loadUserData = (pubkey: string, relays: string[] = []) => {
export const discoverRelays = (lists: List[]) =>
Promise.all(
uniq(lists.flatMap(getRelayUrls))
uniq(lists.flatMap($l => getRelaysFromList($l)))
.filter(isShareableRelayUrl)
.map(url => loadRelay(url)),
)