mirror of
https://github.com/documenso/documenso.git
synced 2026-09-29 08:14:31 +10:00
Respect hidden sender details in document invite emails (#3061)
This commit is contained in:
@@ -169,6 +169,7 @@ export const resendDocument = async ({ id, userId, recipients, teamId, requestMe
|
||||
const {
|
||||
branding,
|
||||
emailLanguage,
|
||||
settings,
|
||||
organisationType,
|
||||
senderEmail,
|
||||
replyToEmail,
|
||||
@@ -225,11 +226,16 @@ export const resendDocument = async ({ id, userId, recipients, teamId, requestMe
|
||||
|
||||
if (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, requestMe
|
||||
selfSigner,
|
||||
organisationType,
|
||||
teamName: envelope.team?.name,
|
||||
includeSenderDetails: settings.includeSenderDetails,
|
||||
reportUrl,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user