mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
DittoPgStore: purify events before streaming them
This commit is contained in:
parent
6eace14850
commit
e5e0ddd7aa
1 changed files with 2 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ export class DittoPgStore extends NPostgres {
|
||||||
const [event] = await this.query([{ ids: [id] }]);
|
const [event] = await this.query([{ ids: [id] }]);
|
||||||
|
|
||||||
if (event) {
|
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. */
|
/** Get events for filters from the database. */
|
||||||
override async query(
|
override async query(
|
||||||
filters: NostrFilter[],
|
filters: NostrFilter[],
|
||||||
opts: { signal?: AbortSignal; pure?: boolean; timeout?: number; limit?: number } = {},
|
opts: { signal?: AbortSignal; timeout?: number; limit?: number } = {},
|
||||||
): Promise<DittoEvent[]> {
|
): Promise<DittoEvent[]> {
|
||||||
filters = await this.expandFilters(filters);
|
filters = await this.expandFilters(filters);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue