The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
Respect hidden sender details in document invite emails (#3061)
Zonaib Bokhari1164d9578eb2
diff --git a/packages/lib/server-only/document/resend-document.ts b/packages/lib/server-only/document/resend-document.tsindex 29b20ed15..41c9681f1 100644--- a/packages/lib/server-only/document/resend-document.ts+++ b/packages/lib/server-only/document/resend-document.ts@@ -169,6 +169,7 @@ export const resendDocument = async ({ id, userId, recipients, teamId, requestMeconst {branding,emailLanguage,+ settings,organisationType,senderEmail,replyToEmail,@@ -225,11 +226,16 @@ export const resendDocument = async ({ id, userId, recipients, teamId, requestMeif (organisationType === OrganisationType.ORGANISATION) {emailSubject = i18n._(msg`Reminder: ${envelope.team.name} invited you to ${recipientActionVerb} a document`);- emailMessage =- envelope.documentMeta.message ||- i18n._(- msg`${user.name || user.email} on behalf of "${envelope.team.name}" has invited you to ${recipientActionVerb} the document "${envelope.title}".`,++ if (!emailMessage) {+ const inviterName = user.name || user.email;++ emailMessage = i18n._(+ settings.includeSenderDetails+ ? msg`${inviterName} on behalf of "${envelope.team.name}" has invited you to ${recipientActionVerb} the document "${envelope.title}".`+ : msg`${envelope.team.name} has invited you to ${recipientActionVerb} the document "${envelope.title}".`,);+ }}const customEmailTemplate = {@@ -256,6 +262,7 @@ export const resendDocument = async ({ id, userId, recipients, teamId, requestMeselfSigner,organisationType,teamName: envelope.team?.name,+ includeSenderDetails: settings.includeSenderDetails,reportUrl,});