From 5bafd1b2643f02a91f2a1429474763708575fe9d Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Thu, 2 May 2024 10:44:08 -0400 Subject: [PATCH] chore: Allow disabling attendee emails if `SMS_ATTENDEE` is a part of the workflow (#14806) * Allow disabling confirmation emails to attendees if workflow contains SMS * Update copy --- apps/web/public/static/locales/en/common.json | 2 +- .../ee/workflows/lib/allowDisablingStandardEmails.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index c29411c756..d03edc8355 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -2022,7 +2022,7 @@ "invite_as": "Invite as", "form_updated_successfully": "Form updated successfully.", "disable_attendees_confirmation_emails": "Disable default confirmation emails for attendees", - "disable_attendees_confirmation_emails_description": "At least one workflow is active on this event type that sends an email to the attendees when the event is booked.", + "disable_attendees_confirmation_emails_description": "At least one workflow is active on this event type that sends a booking confirmation to the attendees.", "disable_host_confirmation_emails": "Disable default confirmation emails for host", "disable_host_confirmation_emails_description": "At least one workflow is active on this event type that sends an email to the host when the event is booked.", "add_an_override": "Add an override", diff --git a/packages/features/ee/workflows/lib/allowDisablingStandardEmails.ts b/packages/features/ee/workflows/lib/allowDisablingStandardEmails.ts index 5f9d8615d3..a1a2277955 100644 --- a/packages/features/ee/workflows/lib/allowDisablingStandardEmails.ts +++ b/packages/features/ee/workflows/lib/allowDisablingStandardEmails.ts @@ -22,6 +22,9 @@ export function allowDisablingAttendeeConfirmationEmails( return !!workflows.find( (workflow) => workflow.trigger === WorkflowTriggerEvents.NEW_EVENT && - !!workflow.steps.find((step) => step.action === WorkflowActions.EMAIL_ATTENDEE) + !!workflow.steps.find( + (step) => + step.action === WorkflowActions.EMAIL_ATTENDEE || step.action === WorkflowActions.SMS_ATTENDEE + ) ); }