Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix(api): respect enableNotification preset setting

Marc Seitzc22ceb69d44d
diff --git a/pages/api/webhooks/services/[...path]/index.ts b/pages/api/webhooks/services/[...path]/index.ts
index 69c4abfb..3d68372b 100644
--- a/pages/api/webhooks/services/[...path]/index.ts
+++ b/pages/api/webhooks/services/[...path]/index.ts
@@ -505,7 +505,7 @@ async function handleDocumentCreate(
emailAuthenticated:
link.emailAuthenticated || preset?.emailAuthenticated || false,
allowDownload: link.allowDownload || preset?.allowDownload,
- enableNotification: link.enableNotification,
+ enableNotification: link.enableNotification ?? preset?.enableNotification ?? false,
enableFeedback: link.enableFeedback,
enableScreenshotProtection: link.enableScreenshotProtection,
showBanner: link.showBanner ?? preset?.showBanner ?? false,
@@ -735,7 +735,7 @@ async function handleLinkCreate(
emailAuthenticated:
link.emailAuthenticated || preset?.emailAuthenticated || false,
allowDownload: link.allowDownload || preset?.allowDownload,
- enableNotification: link.enableNotification,
+ enableNotification: link.enableNotification ?? preset?.enableNotification ?? false,
enableFeedback: link.enableFeedback,
enableScreenshotProtection: link.enableScreenshotProtection,
showBanner: link.showBanner ?? preset?.showBanner ?? false,
@@ -950,7 +950,7 @@ async function handleDataroomCreate(
emailAuthenticated:
link.emailAuthenticated || preset?.emailAuthenticated || false,
allowDownload: link.allowDownload || preset?.allowDownload,
- enableNotification: link.enableNotification,
+ enableNotification: link.enableNotification ?? preset?.enableNotification ?? false,
enableFeedback: link.enableFeedback,
enableScreenshotProtection: link.enableScreenshotProtection,
showBanner: link.showBanner ?? preset?.showBanner ?? false,