From 04f93941ca4d10f09befb4d1b219899ecbe792b1 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 21 Jun 2025 14:34:09 +0000 Subject: fix: Fix webhook not firing on deletion. Fixes #1613 --- packages/shared/queues.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/shared') diff --git a/packages/shared/queues.ts b/packages/shared/queues.ts index a434414c..a2fdc6b4 100644 --- a/packages/shared/queues.ts +++ b/packages/shared/queues.ts @@ -173,6 +173,7 @@ export const AssetPreprocessingQueue = export const zWebhookRequestSchema = z.object({ bookmarkId: z.string(), operation: z.enum(["crawled", "created", "edited", "ai tagged", "deleted"]), + userId: z.string().optional(), }); export type ZWebhookRequest = z.infer; export const WebhookQueue = new SqliteQueue( @@ -189,9 +190,11 @@ export const WebhookQueue = new SqliteQueue( export async function triggerWebhook( bookmarkId: string, operation: ZWebhookRequest["operation"], + userId?: string, ) { await WebhookQueue.enqueue({ bookmarkId, + userId, operation, }); } -- cgit v1.2.3-70-g09d2