From bc802adc93287450cd7914afe5087d91858aabb6 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Mon, 6 May 2024 16:44:21 +0800 Subject: [PATCH] feat: send digestId with the push notification for deep link --- packages/api/src/jobs/ai/create_digest.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/api/src/jobs/ai/create_digest.ts b/packages/api/src/jobs/ai/create_digest.ts index 6ffdd96d4..cfb00b1ef 100644 --- a/packages/api/src/jobs/ai/create_digest.ts +++ b/packages/api/src/jobs/ai/create_digest.ts @@ -560,8 +560,11 @@ const sendPushNotification = async (userId: string, digest: Digest) => { title: 'Omnivore Digest', body: truncate(digest.title, { length: 100 }), } + const data = { + digestId: digest.id, + } - await sendPushNotifications(userId, notification, 'reminder') + await sendPushNotifications(userId, notification, 'reminder', data) } const sendEmail = async (