2
0

🔒 (radar) Improve scam detection by analyzing the entire typebot

This commit is contained in:
Baptiste Arnaud
2023-12-18 09:12:34 +01:00
parent 06b7f40924
commit 7e3edfc0f2
2 changed files with 12 additions and 55 deletions

View File

@@ -89,14 +89,7 @@ export const publishTypebot = authenticatedProcedure
const typebotWasVerified = existingTypebot.riskLevel === -1
const riskLevel = typebotWasVerified
? 0
: computeRiskLevel({
name: existingTypebot.name,
groups: parseGroups(existingTypebot.groups, {
typebotVersion: existingTypebot.version,
}),
})
const riskLevel = typebotWasVerified ? 0 : computeRiskLevel(existingTypebot)
if (riskLevel > 0 && riskLevel !== existingTypebot.riskLevel) {
if (env.MESSAGE_WEBHOOK_URL && riskLevel !== 100)