fix: send attendee email with event updates of reassignment (#17836)
Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
1 parent
2df553b58b
commit
ae70786b2b
8 files changed
+90
-2
No files matched your search
@@ -4,7 +4,11 @@ import { cloneDeep } from "lodash";
|
||||
import { OrganizerDefaultConferencingAppType, getLocationValueForDB } from "@calcom/app-store/locations";
|
||||
import { getEventName } from "@calcom/core/event";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { sendRoundRobinCancelledEmailsAndSMS, sendRoundRobinScheduledEmailsAndSMS } from "@calcom/emails";
|
||||
import {
|
||||
sendRoundRobinCancelledEmailsAndSMS,
|
||||
sendRoundRobinScheduledEmailsAndSMS,
|
||||
sendRoundRobinUpdatedEmailsAndSMS,
|
||||
} from "@calcom/emails";
|
||||
import getBookingResponsesSchema from "@calcom/features/bookings/lib/getBookingResponsesSchema";
|
||||
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
|
||||
import { getEventTypesFromDB } from "@calcom/features/bookings/lib/handleNewBooking/getEventTypesFromDB";
|
||||
@@ -339,6 +343,13 @@ export const roundRobinManualReassignment = async ({
|
||||
}
|
||||
|
||||
if (hasOrganizerChanged) {
|
||||
if (emailsEnabled) {
|
||||
// send email with event updates to attendees
|
||||
await sendRoundRobinUpdatedEmailsAndSMS({
|
||||
calEvent: evtWithoutCancellationReason,
|
||||
});
|
||||
}
|
||||
|
||||
// Handle changing workflows with organizer
|
||||
await handleWorkflowsUpdate({
|
||||
booking,
|
||||
|
||||
@@ -4,7 +4,11 @@ import { cloneDeep } from "lodash";
|
||||
import { OrganizerDefaultConferencingAppType, getLocationValueForDB } from "@calcom/app-store/locations";
|
||||
import { getEventName } from "@calcom/core/event";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { sendRoundRobinCancelledEmailsAndSMS, sendRoundRobinScheduledEmailsAndSMS } from "@calcom/emails";
|
||||
import {
|
||||
sendRoundRobinCancelledEmailsAndSMS,
|
||||
sendRoundRobinScheduledEmailsAndSMS,
|
||||
sendRoundRobinUpdatedEmailsAndSMS,
|
||||
} from "@calcom/emails";
|
||||
import getBookingResponsesSchema from "@calcom/features/bookings/lib/getBookingResponsesSchema";
|
||||
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
|
||||
import { ensureAvailableUsers } from "@calcom/features/bookings/lib/handleNewBooking/ensureAvailableUsers";
|
||||
@@ -389,6 +393,13 @@ export const roundRobinReassignment = async ({
|
||||
|
||||
// Handle changing workflows with organizer
|
||||
if (hasOrganizerChanged) {
|
||||
if (emailsEnabled) {
|
||||
// send email with event updates to attendees
|
||||
await sendRoundRobinUpdatedEmailsAndSMS({
|
||||
calEvent: evtWithoutCancellationReason,
|
||||
});
|
||||
}
|
||||
|
||||
const scheduledWorkflowReminders = await prisma.workflowReminder.findMany({
|
||||
where: {
|
||||
bookingUid: booking.uid,
|
||||
|
||||
Reference in new issue
Block a user