Files
calendar/packages/lib/getReplyToEmail.ts
Anik Dhabal BabuandGitHub 1674ecc585 fix: replyTo includes the correct email (#21843)
* fix: delete dilog button not visible

* fix: replyTo includes the correct email

* Update getReplyToHeader.ts
2025-06-17 10:45:44 +00:00

20 lines
467 B
TypeScript

import type { CalendarEvent } from "@calcom/types/Calendar";
/**
* Returns the reply-to email address to use, with fallback to organizer's email
*/
export const getReplyToEmail = (
calEvent: Pick<CalendarEvent, "customReplyToEmail" | "organizer">,
excludeOrganizerEmail?: boolean
) => {
if (calEvent.customReplyToEmail) {
return calEvent.customReplyToEmail;
}
if (excludeOrganizerEmail) {
return null;
}
return calEvent.organizer.email;
};