Rewrite hydrateEvents

This commit is contained in:
Alex Gleason
2024-04-23 19:31:40 -05:00
parent cbf1e8f280
commit 0aab3eb775
3 changed files with 130 additions and 103 deletions

View File

@@ -11,6 +11,7 @@ import {
clientMsgSchema,
type ClientREQ,
} from '@/schemas/nostr.ts';
import { purifyEvent } from '@/storages/hydrate.ts';
import { Sub } from '@/subs.ts';
import type { AppController } from '@/app.ts';
@@ -70,7 +71,7 @@ function connectStream(socket: WebSocket) {
send(['EOSE', subId]);
for await (const event of Sub.sub(socket, subId, filters)) {
send(['EVENT', subId, event]);
send(['EVENT', subId, purifyEvent(event)]);
}
}