Guard against duplicate ephemeral events being streamed

This commit is contained in:
Alex Gleason 2025-05-08 19:52:41 -05:00
parent 984f76d184
commit 789b6c7e93
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -131,6 +131,9 @@ export class DittoPgStore extends NPostgres {
dbEventsCounter.inc({ kind: event.kind });
if (NKinds.ephemeral(event.kind)) {
if (this.encounters.has(event.id)) return;
this.encounters.set(event.id, true);
return await this.fulfill(event);
}