This commit is contained in:
parent
64a34e43f0
commit
44435db21d
@ -76,7 +76,7 @@ export class QueryManager extends EventEmitter<QueryManagerEvents> {
|
|||||||
* Async fetch results
|
* Async fetch results
|
||||||
*/
|
*/
|
||||||
async fetch(req: RequestBuilder, cb?: (evs: Array<TaggedNostrEvent>) => void) {
|
async fetch(req: RequestBuilder, cb?: (evs: Array<TaggedNostrEvent>) => void) {
|
||||||
const filters = req.buildRaw();
|
const filters = req.buildRaw(this.#system);
|
||||||
const q = this.query(req);
|
const q = this.query(req);
|
||||||
if (cb) {
|
if (cb) {
|
||||||
q.on("event", cb);
|
q.on("event", cb);
|
||||||
|
@ -113,7 +113,7 @@ export class RequestBuilder {
|
|||||||
if (!this.#rawCached && system) {
|
if (!this.#rawCached && system) {
|
||||||
this.#rawCached = system.optimizer.compress(this.#builders.map(f => f.filter));
|
this.#rawCached = system.optimizer.compress(this.#builders.map(f => f.filter));
|
||||||
}
|
}
|
||||||
return this.#rawCached ?? [];
|
return this.#rawCached ?? this.#builders.map(f => f.filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
build(system: SystemInterface): Array<BuiltRawReqFilter> {
|
build(system: SystemInterface): Array<BuiltRawReqFilter> {
|
||||||
|
Loading…
Reference in New Issue
Block a user