DittoPgStore: purify events before streaming them

This commit is contained in:
Alex Gleason 2025-03-06 15:34:31 -06:00
parent 6eace14850
commit e5e0ddd7aa
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -118,7 +118,7 @@ export class DittoPgStore extends NPostgres {
const [event] = await this.query([{ ids: [id] }]);
if (event) {
await this.fulfill(event);
await this.fulfill(purifyEvent(event));
}
});
}
@ -375,7 +375,7 @@ export class DittoPgStore extends NPostgres {
/** Get events for filters from the database. */
override async query(
filters: NostrFilter[],
opts: { signal?: AbortSignal; pure?: boolean; timeout?: number; limit?: number } = {},
opts: { signal?: AbortSignal; timeout?: number; limit?: number } = {},
): Promise<DittoEvent[]> {
filters = await this.expandFilters(filters);