Push events from the client through the pipeline

This commit is contained in:
Alex Gleason 2023-08-17 16:48:58 -05:00
parent 87c67c0a39
commit 51881efde0
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import { Conf } from '@/config.ts';
import { type Event, type Filter, matchFilters, RelayPool, TTLCache } from '@/deps.ts';
import * as pipeline from '@/pipeline.ts';
import { Time } from '@/utils.ts';
import type { GetFiltersOpts } from '@/types.ts';
@ -37,6 +38,7 @@ function getFilters<K extends number>(filters: Filter<K>[], opts: GetFiltersOpts
Conf.poolRelays,
(event: Event | null) => {
if (event && matchFilters(filters, event)) {
pipeline.handleEvent(event);
results.push({
id: event.id,
kind: event.kind,