bug: release onEvent for profile cache
This commit is contained in:
parent
79c88df292
commit
8462a7c04f
@ -56,7 +56,7 @@ class ProfileLoaderService {
|
||||
|
||||
const q = System.Query<PubkeyReplaceableNoteStore>(PubkeyReplaceableNoteStore, sub);
|
||||
// never release this callback, it will stop firing anyway after eose
|
||||
q.onEvent(async ev => {
|
||||
const releaseOnEvent = q.onEvent(async ev => {
|
||||
for (const e of ev) {
|
||||
const profile = mapEventToProfile(e);
|
||||
if (profile) {
|
||||
@ -79,6 +79,7 @@ class ProfileLoaderService {
|
||||
}, 5_000);
|
||||
});
|
||||
|
||||
releaseOnEvent();
|
||||
const couldNotFetch = [...missing].filter(a => !results.some(b => b.pubkey === a));
|
||||
if (couldNotFetch.length > 0) {
|
||||
console.debug("No profiles: ", couldNotFetch);
|
||||
|
Loading…
x
Reference in New Issue
Block a user