fix: Fixed bot fallback not working on integrations

This commit is contained in:
Davidson Gomes
2024-10-04 19:08:23 -03:00
parent 2d732c8071
commit d7ddb99fb0
7 changed files with 101 additions and 26 deletions

View File

@@ -129,21 +129,5 @@ export const findBotByTrigger = async (
if (findTriggerContains) return findTriggerContains;
const fallback = await settingsRepository.findFirst({
where: {
instanceId: instanceId,
},
});
if (fallback?.openaiIdFallback) {
const findFallback = await botRepository.findFirst({
where: {
id: fallback.openaiIdFallback,
},
});
if (findFallback) return findFallback;
}
return null;
};