From 9a72c648c5efa53a209e140e7214767e06d275ad Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Mon, 19 Dec 2022 14:50:14 +0100 Subject: [PATCH] Removes EMAIL_ADDRESS action (#6102) Co-authored-by: CarinaWolli Co-authored-by: Peer Richelsen --- .../features/ee/workflows/lib/getOptions.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/features/ee/workflows/lib/getOptions.ts b/packages/features/ee/workflows/lib/getOptions.ts index c3059e74e1..557bbf93ab 100644 --- a/packages/features/ee/workflows/lib/getOptions.ts +++ b/packages/features/ee/workflows/lib/getOptions.ts @@ -4,17 +4,18 @@ import { TFunction } from "next-i18next"; import { TIME_UNIT, WORKFLOW_ACTIONS, WORKFLOW_TEMPLATES, WORKFLOW_TRIGGER_EVENTS } from "./constants"; export function getWorkflowActionOptions(t: TFunction, isTeamsPlan?: boolean) { - return WORKFLOW_ACTIONS.map((action) => { - const actionString = t(`${action.toLowerCase()}_action`); + return WORKFLOW_ACTIONS.filter((action) => action !== WorkflowActions.EMAIL_ADDRESS) //removing EMAIL_ADDRESS for now due to abuse episode + .map((action) => { + const actionString = t(`${action.toLowerCase()}_action`); - const isSMSAction = action === WorkflowActions.SMS_ATTENDEE || action === WorkflowActions.SMS_NUMBER; + const isSMSAction = action === WorkflowActions.SMS_ATTENDEE || action === WorkflowActions.SMS_NUMBER; - return { - label: actionString.charAt(0).toUpperCase() + actionString.slice(1), - value: action, - disabled: isSMSAction && !isTeamsPlan, - }; - }); + return { + label: actionString.charAt(0).toUpperCase() + actionString.slice(1), + value: action, + disabled: isSMSAction && !isTeamsPlan, + }; + }); } export function getWorkflowTriggerOptions(t: TFunction) {