mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 03:42:23 -06:00
Merge pull request #1599 from splusoficial/develop
fix: ajuste na validacao dos bots e pausar sessao
This commit is contained in:
@@ -880,6 +880,12 @@ export abstract class BaseChatbotController<BotType = any, BotData extends BaseC
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip if session exists and status is paused
|
||||
if (session && session.status === 'paused') {
|
||||
this.logger.warn(`Session for ${remoteJid} is paused, skipping message processing`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Merged settings
|
||||
const mergedSettings = {
|
||||
...settings,
|
||||
|
||||
@@ -194,13 +194,13 @@ export class ChatbotController {
|
||||
instance: InstanceDto,
|
||||
session?: IntegrationSession,
|
||||
) {
|
||||
let findBot: null;
|
||||
let findBot: any = null;
|
||||
|
||||
if (!session) {
|
||||
findBot = await findBotByTrigger(botRepository, content, instance.instanceId);
|
||||
|
||||
if (!findBot) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
findBot = await botRepository.findFirst({
|
||||
|
||||
Reference in New Issue
Block a user