feat: add compatibility for legacy comments

This commit is contained in:
codytseng 2025-12-23 23:30:57 +08:00
parent 0ee93718da
commit 96abe5f24f
4 changed files with 61 additions and 24 deletions

View file

@ -842,6 +842,10 @@ class ClientService extends EventTarget {
}
}
getReplaeableEventFromCache(coordinate: string): NEvent | undefined {
return this.replaceableEventCacheMap.get(coordinate)
}
private async fetchEventById(relayUrls: string[], id: string): Promise<NEvent | undefined> {
const event = await this.fetchEventFromBigRelaysDataloader.load(id)
if (event) {

View file

@ -17,7 +17,6 @@ class FayanService {
return new Array(pubkeys.length).fill(null)
}
const data = await res.json()
console.log('FayanService fetched user percentiles:', data)
return pubkeys.map((pubkey) => data[pubkey] ?? null)
} catch {
return new Array(pubkeys.length).fill(null)