mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 12:22:21 -06:00
fix: Correct pause and listen to my messages from Typebot integration
This commit fixes an issue where the bot was not pausing and listening to my messages from the Typebot integration. The changes include modifying the Typebot service, Typebot schema, and WhatsApp Baileys and Business services to properly handle the pause and message listening functionality. The affected files are typebot.service.ts, typebot.schema.ts, and both WhatsApp services. The specific modifications include adding a new 'delete' status option in the Typebot schema, updating the Typebot service to handle the 'delete' status, and adjusting the WhatsApp services to properly send Typebot messages based on the new schema. This ensures that the bot can pause and listen to messages from Typebot integration, providing a better user experience.
This commit is contained in:
@@ -1951,15 +1951,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
);
|
||||
}
|
||||
|
||||
if (this.configService.get<Typebot>('TYPEBOT').ENABLED && !isIntegration) {
|
||||
if (messageRaw.messageType !== 'reactionMessage')
|
||||
await this.typebotService.sendTypebot(
|
||||
{ instanceName: this.instance.name, instanceId: this.instanceId },
|
||||
messageRaw.key.remoteJid,
|
||||
messageRaw,
|
||||
);
|
||||
}
|
||||
|
||||
if (this.configService.get<Database>('DATABASE').SAVE_DATA.NEW_MESSAGE)
|
||||
await this.prismaRepository.message.create({
|
||||
data: messageRaw,
|
||||
|
||||
@@ -850,15 +850,6 @@ export class BusinessStartupService extends ChannelStartupService {
|
||||
);
|
||||
}
|
||||
|
||||
if (this.configService.get<Typebot>('TYPEBOT').ENABLED && !isIntegration) {
|
||||
if (messageRaw.messageType !== 'reactionMessage')
|
||||
await this.typebotService.sendTypebot(
|
||||
{ instanceName: this.instance.name, instanceId: this.instanceId },
|
||||
messageRaw.key.remoteJid,
|
||||
messageRaw,
|
||||
);
|
||||
}
|
||||
|
||||
await this.prismaRepository.message.create({
|
||||
data: messageRaw,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user