fix: wrong signing invitation message (#1497)

This commit is contained in:
Catalin Pit
2024-12-01 22:47:11 +02:00
committed by GitHub
parent 87186e08b1
commit 62806298cf
6 changed files with 69 additions and 31 deletions

View File

@ -61,7 +61,7 @@ export const TemplateDocumentInvite = ({
<>
{includeSenderDetails ? (
<Trans>
{inviterName} on behalf of {teamName} has invited you to{' '}
{inviterName} on behalf of "{teamName}" has invited you to{' '}
{_(actionVerb).toLowerCase()}
</Trans>
) : (

View File

@ -42,7 +42,7 @@ export const DocumentInviteEmailTemplate = ({
if (isTeamInvite) {
previewText = includeSenderDetails
? msg`${inviterName} on behalf of ${teamName} has invited you to ${action} ${documentName}`
? msg`${inviterName} on behalf of "${teamName}" has invited you to ${action} ${documentName}`
: msg`${teamName} has invited you to ${action} ${documentName}`;
}
@ -90,14 +90,16 @@ export const DocumentInviteEmailTemplate = ({
<Container className="mx-auto mt-12 max-w-xl">
<Section>
<Text className="my-4 text-base font-semibold">
<Trans>
{inviterName}{' '}
<Link className="font-normal text-slate-400" href="mailto:{inviterEmail}">
({inviterEmail})
</Link>
</Trans>
</Text>
{!isTeamInvite && (
<Text className="my-4 text-base font-semibold">
<Trans>
{inviterName}{' '}
<Link className="font-normal text-slate-400" href="mailto:{inviterEmail}">
({inviterEmail})
</Link>
</Trans>
</Text>
)}
<Text className="mt-2 text-base text-slate-400">
{customBody ? (

View File

@ -133,7 +133,7 @@ export const SEND_SIGNING_EMAIL_JOB_DEFINITION = {
if (!emailMessage) {
emailMessage = i18n._(
team.teamGlobalSettings?.includeSenderDetails
? msg`${user.name} on behalf of ${team.name} has invited you to ${recipientActionVerb} the document "${document.title}".`
? msg`${user.name} on behalf of "${team.name}" has invited you to ${recipientActionVerb} the document "${document.title}".`
: msg`${team.name} has invited you to ${recipientActionVerb} the document "${document.title}".`,
);
}

View File

@ -81,6 +81,17 @@ export const getDocumentAndSenderByToken = async ({
token,
},
},
team: {
select: {
name: true,
teamEmail: true,
teamGlobalSettings: {
select: {
includeSenderDetails: true,
},
},
},
},
},
});

View File

@ -134,7 +134,7 @@ export const resendDocument = async ({
emailMessage =
customEmail?.message ||
i18n._(
msg`${user.name} on behalf of ${document.team.name} has invited you to ${recipientActionVerb} the document "${document.title}".`,
msg`${user.name} on behalf of "${document.team.name}" has invited you to ${recipientActionVerb} the document "${document.title}".`,
);
}