fix: corrige processamento de mensagens subsequentes no Evolution Bot

Corrige o problema onde o Evolution Bot não processava mensagens subsequentes após a primeira resposta. A correção permite que o bot continue respondendo a todas as mensagens enquanto a sessão estiver ativa, melhorando a continuidade da conversa.
This commit is contained in:
OrionDesign 2025-05-22 00:54:37 -03:00
parent 65111481b9
commit da51b6bd76
3 changed files with 4 additions and 3 deletions

View File

@ -876,7 +876,7 @@ export abstract class BaseChatbotController<BotType = any, BotData extends BaseC
} }
// Skip if session exists but not awaiting user input // Skip if session exists but not awaiting user input
if (session && !session.awaitUser) { if (session && session.status === 'closed') {
return; return;
} }

View File

@ -179,7 +179,7 @@ export class ChatbotController {
if (session) { if (session) {
if (session.status !== 'closed' && !session.botId) { if (session.status !== 'closed' && !session.botId) {
this.logger.warn('Session is already opened in another integration'); this.logger.warn('Session is already opened in another integration');
return; return null;
} else if (!session.botId) { } else if (!session.botId) {
session = null; session = null;
} }

View File

@ -89,7 +89,8 @@ export class EvolutionBotController extends BaseChatbotController<EvolutionBot,
settings: any, settings: any,
content: string, content: string,
pushName?: string, pushName?: string,
msg?: any,
) { ) {
await this.evolutionBotService.process(instance, remoteJid, bot, session, settings, content, pushName); await this.evolutionBotService.process(instance, remoteJid, bot, session, settings, content, pushName, msg);
} }
} }