mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
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:
parent
65111481b9
commit
da51b6bd76
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user