feat: bypass IndexedDB cache when viewing user profile

This commit is contained in:
codytseng 2025-05-20 23:16:49 +08:00
parent e3c8dc838d
commit 5c39413420
3 changed files with 4 additions and 9 deletions

View file

@ -686,12 +686,7 @@ class ClientService extends EventTarget {
}
async fetchProfile(id: string, skipCache: boolean = false): Promise<TProfile | undefined> {
let profileEvent: NEvent | undefined
if (skipCache) {
profileEvent = await this.fetchProfileEvent(id, skipCache)
} else {
profileEvent = await this.fetchProfileEvent(id)
}
const profileEvent = await this.fetchProfileEvent(id, skipCache)
if (profileEvent) {
return getProfileFromProfileEvent(profileEvent)
}