Respect hidden sender details in document invite emails (#3061)

This commit is contained in:
Zonaib Bokhari
2026-09-21 09:20:39 +03:00
committed by GitHub
parent e658cc5818
commit 1164d9578e
@@ -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,
});