From 60b762a1655e84ad7a610fb46b378e055e735274 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 29 May 2024 18:25:18 -0500 Subject: [PATCH] Enforce a created_at max value --- src/pipeline.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pipeline.ts b/src/pipeline.ts index e60ce6c..81e9b5e 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -115,6 +115,11 @@ async function storeEvent(event: DittoEvent, signal?: AbortSignal): Promise= 2_147_483_647) { + throw new RelayError('blocked', 'event too far in the future'); + } + await updateStats({ event, store, kysely }).catch(debug); await store.event(event, { signal }); }