Skip to content

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

feat: update doc notification subject line

Marc Seitz62180332b5c9
diff --git a/lib/emails/send-viewed-document.ts b/lib/emails/send-viewed-document.ts
index 05bd52c0..3b4b20ab 100644
--- a/lib/emails/send-viewed-document.ts
+++ b/lib/emails/send-viewed-document.ts
@@ -25,10 +25,15 @@ export const sendViewedDocumentEmail = async ({
throw new Error("Document Owner not found");
}
+ let subjectLine: string = `Your document has been viewed: ${documentName}`;
+ if (viewerEmail) {
+ subjectLine = `${viewerEmail} viewed the document: ${documentName}`;
+ }
+
const data = await sendEmail({
to: ownerEmail,
cc: teamMembers,
- subject: `Your document has been viewed: ${documentName}`,
+ subject: subjectLine,
react: emailTemplate,
test: process.env.NODE_ENV === "development",
system: true,