* fix: exclude email from replyTo * update * Update scheduleEmailReminders.ts
17 lines
514 B
TypeScript
17 lines
514 B
TypeScript
import type { CalendarEvent } from "@calcom/types/Calendar";
|
|
|
|
import { getReplyToEmail } from "./getReplyToEmail";
|
|
|
|
export function getReplyToHeader(calEvent: CalendarEvent, additionalEmails?: string | string[]) {
|
|
if (calEvent.hideOrganizerEmail) return {};
|
|
|
|
const replyToEmail = getReplyToEmail(calEvent);
|
|
const replyTo = additionalEmails
|
|
? Array.isArray(additionalEmails)
|
|
? [...additionalEmails, replyToEmail]
|
|
: [additionalEmails, replyToEmail]
|
|
: replyToEmail;
|
|
|
|
return { replyTo };
|
|
}
|