Fix ts errors
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {PINS, asDecryptedEvent, readList} from "@welshman/util"
|
||||
import {type TrustedEvent, type PublishedList} from "@welshman/util"
|
||||
import {type SubscribeRequestWithHandlers} from "@welshman/net"
|
||||
import {TrustedEvent, PublishedList} from "@welshman/util"
|
||||
import {load, MultiRequestOptions} from "@welshman/net"
|
||||
import {deriveEventsMapped} from "@welshman/store"
|
||||
import {repository} from "./core.js"
|
||||
import {load} from "./subscribe.js"
|
||||
import {Router} from "./router.js"
|
||||
import {collection} from "./collection.js"
|
||||
import {loadRelaySelections} from "./relaySelections.js"
|
||||
|
||||
@@ -21,8 +21,12 @@ export const {
|
||||
name: "pins",
|
||||
store: pins,
|
||||
getKey: pins => pins.event.pubkey,
|
||||
load: async (pubkey: string, request: Partial<SubscribeRequestWithHandlers> = {}) => {
|
||||
load: async (pubkey: string, request: Partial<MultiRequestOptions> = {}) => {
|
||||
await loadRelaySelections(pubkey, request)
|
||||
await load({...request, filters: [{kinds: [PINS], authors: [pubkey]}]})
|
||||
|
||||
const filter = {kinds: [PINS], authors: [pubkey]}
|
||||
const relays = Router.getInstance().FromPubkey(pubkey).getUrls()
|
||||
|
||||
await load({relays, ...request, filter})
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user