Switch to makeOutboxLoader for relay selection in loaders

This commit is contained in:
Jon Staab
2025-04-09 16:26:18 -07:00
parent 859f7fa68f
commit 0c43bf199f
5 changed files with 45 additions and 49 deletions
+2 -3
View File
@@ -3,7 +3,7 @@ import {TrustedEvent, PublishedList} from "@welshman/util"
import {deriveEventsMapped} from "@welshman/store"
import {repository} from "./core.js"
import {collection} from "./collection.js"
import {loadWithAsapMetaRelayUrls} from "./relaySelections.js"
import {makeOutboxLoader} from "./relaySelections.js"
export const pins = deriveEventsMapped<PublishedList>(repository, {
filters: [{kinds: [PINS]}],
@@ -19,6 +19,5 @@ export const {
name: "pins",
store: pins,
getKey: pins => pins.event.pubkey,
load: (pubkey: string, relays: string[]) =>
loadWithAsapMetaRelayUrls(pubkey, relays, [{kinds: [PINS], authors: [pubkey]}]),
load: makeOutboxLoader([PINS])
})