Skip to content

Commit 673823c

Browse files
authored
fix: Workflow scanning (calcom#22273)
1 parent 15b26df commit 673823c

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

packages/features/tasker/tasks/scanWorkflowBody.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe("scanWorkflowBody", () => {
120120
});
121121
});
122122

123-
it("should lock user and not update step if content is spam", async () => {
123+
it.skip("should lock user and not update step if content is spam", async () => {
124124
const payload = JSON.stringify({
125125
userId: 1,
126126
workflowStepIds: [1],

packages/features/tasker/tasks/scanWorkflowBody.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import z from "zod";
33
import { getTemplateBodyForAction } from "@calcom/features/ee/workflows/lib/actionHelperFunctions";
44
import compareReminderBodyToTemplate from "@calcom/features/ee/workflows/lib/compareReminderBodyToTemplate";
55
import { Task } from "@calcom/features/tasker/repository";
6-
import { lockUser, LockReason } from "@calcom/lib/autoLock";
76
import logger from "@calcom/lib/logger";
87
import { getTranslation } from "@calcom/lib/server/i18n";
98
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
@@ -112,7 +111,6 @@ export async function scanWorkflowBody(payload: string) {
112111
if (!workflowStep.workflow.user?.whitelistWorkflows) {
113112
// We won't delete the workflow step incase it is flagged as a false positive
114113
log.warn(`Workflow step ${workflowStep.id} is spam with body ${workflowStep.reminderBody}`);
115-
await lockUser("userId", userId.toString(), LockReason.SPAM_WORKFLOW_BODY);
116114

117115
// Return early if spam is detected
118116
return;

0 commit comments

Comments
 (0)