diff --git a/apps/builder/src/features/editor/components/EditorPage.tsx b/apps/builder/src/features/editor/components/EditorPage.tsx index 9bf35ca54..192142ab5 100644 --- a/apps/builder/src/features/editor/components/EditorPage.tsx +++ b/apps/builder/src/features/editor/components/EditorPage.tsx @@ -28,15 +28,15 @@ export const EditorPage = () => { ) const bgColor = useColorModeValue('#f4f5f8', 'gray.850') + const isSuspicious = typebot?.riskLevel === 100 && !workspace?.isVerified + if (is404) return return ( - {typebot?.riskLevel === 100 && !workspace?.isVerified && ( - - )} + {isSuspicious && } { > - + diff --git a/apps/builder/src/features/publish/components/PublishButton.tsx b/apps/builder/src/features/publish/components/PublishButton.tsx index 5ecf6e277..48a893e8a 100644 --- a/apps/builder/src/features/publish/components/PublishButton.tsx +++ b/apps/builder/src/features/publish/components/PublishButton.tsx @@ -77,6 +77,11 @@ export const PublishButton = ({ title: t('publish.error.label'), description: error.message, }) + if (error.data?.httpStatus === 403) { + setTimeout(() => { + window.location.reload() + }, 3000) + } }, onSuccess: () => { refetchPublishedTypebot({ diff --git a/apps/builder/src/features/typebot/api/publishTypebot.ts b/apps/builder/src/features/typebot/api/publishTypebot.ts index 5e086ab15..c9efac762 100644 --- a/apps/builder/src/features/typebot/api/publishTypebot.ts +++ b/apps/builder/src/features/typebot/api/publishTypebot.ts @@ -98,7 +98,11 @@ export const publishTypebot = authenticatedProcedure 'Radar detected a potential malicious typebot. This bot is being manually reviewed by Fraud Prevention team.', }) - const riskLevel = typebotWasVerified ? 0 : computeRiskLevel(existingTypebot) + const riskLevel = typebotWasVerified + ? 0 + : computeRiskLevel(existingTypebot, { + debug: env.NODE_ENV === 'development', + }) if (riskLevel > 0 && riskLevel !== existingTypebot.riskLevel) { if (env.MESSAGE_WEBHOOK_URL && riskLevel !== 100 && riskLevel > 60)