fix(profile): fetch only from relays on visiting profile

This commit is contained in:
en 2025-02-03 17:36:58 +01:00
parent 4430d1780e
commit 3df32e2226

View File

@ -1,3 +1,4 @@
import { NDKSubscriptionCacheUsage } from '@nostr-dev-kit/ndk'
import { NDKContextType } from 'contexts/NDKContext' import { NDKContextType } from 'contexts/NDKContext'
import { nip19 } from 'nostr-tools' import { nip19 } from 'nostr-tools'
import { LoaderFunctionArgs, redirect } from 'react-router-dom' import { LoaderFunctionArgs, redirect } from 'react-router-dom'
@ -94,7 +95,9 @@ export const profileRouteLoader =
} }
const settled = await Promise.allSettled([ const settled = await Promise.allSettled([
ndkContext.findMetadata(profilePubkey), ndkContext.findMetadata(profilePubkey, {
cacheUsage: NDKSubscriptionCacheUsage.ONLY_RELAY
}),
ndkContext.getMuteLists(loggedInUserPubkey), ndkContext.getMuteLists(loggedInUserPubkey),
getReportingSet(CurationSetIdentifiers.NSFW, ndkContext), getReportingSet(CurationSetIdentifiers.NSFW, ndkContext),
getReportingSet(CurationSetIdentifiers.Repost, ndkContext) getReportingSet(CurationSetIdentifiers.Repost, ndkContext)