fix(workflows): hide organizer email in workflow emails (#23525)

This commit is contained in:
Harsh Jadhav
2025-09-02 22:25:32 +00:00
committed by GitHub
parent 9b38ed65c0
commit 7f200df1ac
2 changed files with 9 additions and 4 deletions
@@ -8,6 +8,7 @@ import { v4 as uuidv4 } from "uuid";
import dayjs from "@calcom/dayjs";
import generateIcsString from "@calcom/emails/lib/generateIcsString";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { SENDER_NAME } from "@calcom/lib/constants";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
@@ -352,7 +353,9 @@ export async function handler(req: NextRequest) {
},
]
: undefined,
sender: reminder.workflowStep.sender,
sender: reminder.booking?.eventType?.hideOrganizerEmail
? SENDER_NAME
: reminder.workflowStep.sender,
...(!reminder.booking?.eventType?.hideOrganizerEmail && {
replyTo:
reminder.booking?.eventType?.customReplyToEmail ??
@@ -441,7 +444,9 @@ export async function handler(req: NextRequest) {
subject: emailContent.emailSubject,
to: [sendTo],
html: emailContent.emailBody,
sender: reminder.workflowStep?.sender,
sender: reminder.booking?.eventType?.hideOrganizerEmail
? SENDER_NAME
: reminder.workflowStep?.sender,
...(!reminder.booking?.eventType?.hideOrganizerEmail && {
replyTo:
reminder.booking?.eventType?.customReplyToEmail ||
@@ -6,7 +6,7 @@ import generateIcsString from "@calcom/emails/lib/generateIcsString";
import { FeaturesRepository } from "@calcom/features/flags/features.repository";
import { preprocessNameFieldDataWithVariant } from "@calcom/features/form-builder/utils";
import tasker from "@calcom/features/tasker";
import { WEBSITE_URL } from "@calcom/lib/constants";
import { SENDER_NAME, WEBSITE_URL } from "@calcom/lib/constants";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
import prisma from "@calcom/prisma";
@@ -270,7 +270,7 @@ export const scheduleEmailReminder = async (args: scheduleEmailReminderArgs) =>
html: emailContent.emailBody,
...(!evt.hideOrganizerEmail && { replyTo: evt?.eventType?.customReplyToEmail || evt.organizer.email }),
attachments,
sender,
sender: evt.hideOrganizerEmail ? SENDER_NAME : sender,
};
}