mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
feat(invite-users): fix issue where invitations were not sent when the actor was an identity
This commit is contained in:
@@ -1211,8 +1211,8 @@ export const orgServiceFactory = ({
|
|||||||
subjectLine: "Infisical organization invitation",
|
subjectLine: "Infisical organization invitation",
|
||||||
recipients: [el.email],
|
recipients: [el.email],
|
||||||
substitutions: {
|
substitutions: {
|
||||||
inviterFirstName: invitingUser.firstName,
|
inviterFirstName: invitingUser?.firstName,
|
||||||
inviterUsername: invitingUser.email,
|
inviterUsername: invitingUser?.email,
|
||||||
organizationName: org?.name,
|
organizationName: org?.name,
|
||||||
email: el.email,
|
email: el.email,
|
||||||
organizationId: org?.id.toString(),
|
organizationId: org?.id.toString(),
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { BaseEmailWrapper, BaseEmailWrapperProps } from "./BaseEmailWrapper";
|
|||||||
|
|
||||||
interface OrganizationInvitationTemplateProps extends Omit<BaseEmailWrapperProps, "preview" | "title"> {
|
interface OrganizationInvitationTemplateProps extends Omit<BaseEmailWrapperProps, "preview" | "title"> {
|
||||||
metadata?: string;
|
metadata?: string;
|
||||||
inviterFirstName: string;
|
inviterFirstName?: string;
|
||||||
inviterUsername: string;
|
inviterUsername?: string;
|
||||||
organizationName: string;
|
organizationName: string;
|
||||||
email: string;
|
email: string;
|
||||||
organizationId: string;
|
organizationId: string;
|
||||||
@@ -38,11 +38,19 @@ export const OrganizationInvitationTemplate = ({
|
|||||||
</Heading>
|
</Heading>
|
||||||
<Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border text-center border-solid border-gray-200 rounded-md bg-gray-50">
|
<Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border text-center border-solid border-gray-200 rounded-md bg-gray-50">
|
||||||
<Text className="text-black text-[14px] leading-[24px]">
|
<Text className="text-black text-[14px] leading-[24px]">
|
||||||
<strong>{inviterFirstName}</strong> (
|
{inviterFirstName && inviterUsername ? (
|
||||||
<Link href={`mailto:${inviterUsername}`} className="text-slate-700 no-underline">
|
<>
|
||||||
{inviterUsername}
|
<strong>{inviterFirstName}</strong> (
|
||||||
</Link>
|
<Link href={`mailto:${inviterUsername}`} className="text-slate-700 no-underline">
|
||||||
) has invited you to collaborate on <strong>{organizationName}</strong>.
|
{inviterUsername}
|
||||||
|
</Link>
|
||||||
|
) has invited you to collaborate on <strong>{organizationName}</strong>.
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
You have been invited to collaborate on <strong>{organizationName}</strong>.
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
</Section>
|
</Section>
|
||||||
<Section className="text-center mt-[28px]">
|
<Section className="text-center mt-[28px]">
|
||||||
|
|||||||
Reference in New Issue
Block a user