bug: fetch zapper when indexedDb is not available
This commit is contained in:
parent
5f0bd9699f
commit
840e2ff400
@ -98,8 +98,6 @@ export class UserProfileCache {
|
|||||||
const existing = this.get(m.pubkey);
|
const existing = this.get(m.pubkey);
|
||||||
const refresh = existing && existing.created === m.created && existing.loaded < m.loaded;
|
const refresh = existing && existing.created === m.created && existing.loaded < m.loaded;
|
||||||
if (!existing || existing.created < m.created || refresh) {
|
if (!existing || existing.created < m.created || refresh) {
|
||||||
this.#cache.set(m.pubkey, m);
|
|
||||||
if (db.ready) {
|
|
||||||
// fetch zapper key
|
// fetch zapper key
|
||||||
const lnurl = m.lud16 || m.lud06;
|
const lnurl = m.lud16 || m.lud06;
|
||||||
if (lnurl) {
|
if (lnurl) {
|
||||||
@ -112,6 +110,9 @@ export class UserProfileCache {
|
|||||||
}
|
}
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.#cache.set(m.pubkey, m);
|
||||||
|
if (db.ready) {
|
||||||
await db.users.put(m);
|
await db.users.put(m);
|
||||||
this.#diskCache.add(m.pubkey);
|
this.#diskCache.add(m.pubkey);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user