Scheduling infrastructure for absolutely everyone.
fix: Workflow scanning (#22273)
Joe Au-Yeung673823cb97e4
diff --git a/packages/features/tasker/tasks/scanWorkflowBody.test.ts b/packages/features/tasker/tasks/scanWorkflowBody.test.tsindex 0c3f2ffb280..d3ea6699e89 100644--- a/packages/features/tasker/tasks/scanWorkflowBody.test.ts+++ b/packages/features/tasker/tasks/scanWorkflowBody.test.ts@@ -120,7 +120,7 @@ describe("scanWorkflowBody", () => {});});- it("should lock user and not update step if content is spam", async () => {+ it.skip("should lock user and not update step if content is spam", async () => {const payload = JSON.stringify({userId: 1,workflowStepIds: [1],diff --git a/packages/features/tasker/tasks/scanWorkflowBody.ts b/packages/features/tasker/tasks/scanWorkflowBody.tsindex b63a773aa51..20d161d3201 100644--- a/packages/features/tasker/tasks/scanWorkflowBody.ts+++ b/packages/features/tasker/tasks/scanWorkflowBody.ts@@ -3,7 +3,6 @@ import z from "zod";import { getTemplateBodyForAction } from "@calcom/features/ee/workflows/lib/actionHelperFunctions";import compareReminderBodyToTemplate from "@calcom/features/ee/workflows/lib/compareReminderBodyToTemplate";import { Task } from "@calcom/features/tasker/repository";-import { lockUser, LockReason } from "@calcom/lib/autoLock";import logger from "@calcom/lib/logger";import { getTranslation } from "@calcom/lib/server/i18n";import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";@@ -112,7 +111,6 @@ export async function scanWorkflowBody(payload: string) {if (!workflowStep.workflow.user?.whitelistWorkflows) {// We won't delete the workflow step incase it is flagged as a false positivelog.warn(`Workflow step ${workflowStep.id} is spam with body ${workflowStep.reminderBody}`);- await lockUser("userId", userId.toString(), LockReason.SPAM_WORKFLOW_BODY);// Return early if spam is detectedreturn;