Scheduling infrastructure for absolutely everyone.
rate limiting fix (#15095)
Carina Wollendorfer64ad1c8d5be1
diff --git a/packages/features/ee/workflows/lib/reminders/reminderScheduler.ts b/packages/features/ee/workflows/lib/reminders/reminderScheduler.tsindex 68422b62cc3..5a4848249e5 100644--- a/packages/features/ee/workflows/lib/reminders/reminderScheduler.ts+++ b/packages/features/ee/workflows/lib/reminders/reminderScheduler.ts@@ -1,6 +1,10 @@import type { Workflow, WorkflowsOnEventTypes, WorkflowStep } from "@prisma/client";-import { isSMSAction, isWhatsappAction } from "@calcom/features/ee/workflows/lib/actionHelperFunctions";+import {+ isSMSAction,+ isSMSOrWhatsappAction,+ isWhatsappAction,+} from "@calcom/features/ee/workflows/lib/actionHelperFunctions";import { checkSMSRateLimit } from "@calcom/lib/checkRateLimitAndThrowError";import { SENDER_NAME } from "@calcom/lib/constants";import { WorkflowActions, WorkflowMethods, WorkflowTriggerEvents } from "@calcom/prisma/enums";@@ -46,12 +50,14 @@ const processWorkflowStep = async (seatReferenceUid,}: ProcessWorkflowStepParams) => {- if (isSMSAction(step.action)) {+ if (isSMSOrWhatsappAction(step.action)) {await checkSMSRateLimit({identifier: `sms:${workflow.teamId ? "team:" : "user:"}${workflow.teamId || workflow.userId}`,rateLimitingType: "sms",});+ }+ if (isSMSAction(step.action)) {const sendTo = step.action === WorkflowActions.SMS_ATTENDEE ? smsReminderNumber : step.sendTo;await scheduleSMSReminder({evt,