Fix stale profile data #214

Merged
enes merged 6 commits from issues/208-profile-box-cache into staging 2025-02-03 16:43:49 +00:00
Showing only changes of commit 3df32e2226 - Show all commits

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)