Rework outbox loader

This commit is contained in:
Jon Staab
2025-08-04 09:55:15 -07:00
parent c6434028a6
commit 2edbd44f64
4 changed files with 44 additions and 77 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import {readProfile, displayProfile, displayPubkey, PROFILE} from "@welshman/uti
import {PublishedProfile} from "@welshman/util"
import {deriveEventsMapped, collection, withGetter} from "@welshman/store"
import {repository} from "./core.js"
import {makeOutboxLoader} from "./relaySelections.js"
import {makeOutboxLoaderWithIndexers} from "./relaySelections.js"
export const profiles = withGetter(
deriveEventsMapped<PublishedProfile>(repository, {
@@ -21,7 +21,7 @@ export const {
name: "profiles",
store: profiles,
getKey: profile => profile.event.pubkey,
load: makeOutboxLoader(PROFILE),
load: makeOutboxLoaderWithIndexers(PROFILE),
})
export const displayProfileByPubkey = (pubkey: string | undefined) =>