nip-114: filter.ids_only, HAVE message

This commit is contained in:
Martti Malmi
2024-01-16 13:23:57 +02:00
parent 7c1f2c539f
commit 579589f635
5 changed files with 27 additions and 1 deletions

View File

@ -394,6 +394,9 @@ export class Query extends EventEmitter<QueryEvents> {
#sendQueryInternal(c: Connection, q: BuiltRawReqFilter) {
let filters = q.filters;
if (c.SupportsNip(Nips.GetMatchingEventIds)) {
filters = filters.map(f => ({ ...f, ids_only: true }));
}
const qt = new QueryTrace(c.Address, filters, c.Id);
qt.on("close", x => c.closeReq(x));