fix adding profiles to search
This commit is contained in:
2
packages/system/src/cache/user-metadata.ts
vendored
2
packages/system/src/cache/user-metadata.ts
vendored
@ -1,6 +1,5 @@
|
||||
import { CachedMetadata } from ".";
|
||||
import { fetchNip05Pubkey, FeedCache, LNURL, DexieTableLike } from "@snort/shared";
|
||||
import { addCachedMetadataToFuzzySearch } from "@snort/app/src/Db/FuzzySearch";
|
||||
|
||||
export class UserProfileCache extends FeedCache<CachedMetadata> {
|
||||
#zapperQueue: Array<{ pubkey: string; lnurl: string }> = [];
|
||||
@ -22,7 +21,6 @@ export class UserProfileCache extends FeedCache<CachedMetadata> {
|
||||
if (follows) {
|
||||
await this.buffer(follows);
|
||||
}
|
||||
this.snapshot().forEach(p => addCachedMetadataToFuzzySearch(p));
|
||||
}
|
||||
|
||||
async search(q: string): Promise<Array<CachedMetadata>> {
|
||||
|
@ -199,6 +199,10 @@ export class NostrSystem extends EventEmitter<NostrSystemEvents> implements Syst
|
||||
return this.#relayCache;
|
||||
}
|
||||
|
||||
get UserProfileCache(): FeedCache<CachedMetadata> {
|
||||
return this.#profileCache;
|
||||
}
|
||||
|
||||
get Optimizer(): Optimizer {
|
||||
return this.#optimizer;
|
||||
}
|
||||
|
Reference in New Issue
Block a user