mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-24 06:07:45 -06:00
fix: Fixed bot fallback not working on integrations
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user