feat: added reply, delete and message reaction in chatwoot v3.3.1

This commit is contained in:
Davidson Gomes
2023-12-12 15:16:09 -03:00
parent 3e904aa160
commit ae66be197e
7 changed files with 264 additions and 21 deletions

View File

@@ -166,7 +166,7 @@ export class WAStartupService {
private phoneNumber: string;
private chatwootService = new ChatwootService(waMonitor, this.configService);
private chatwootService = new ChatwootService(waMonitor, this.configService, this.repository);
private typebotService = new TypebotService(waMonitor, this.configService);
@@ -1778,11 +1778,15 @@ export class WAStartupService {
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
if (this.localChatwoot.enabled) {
await this.chatwootService.eventWhatsapp(
const chatwootSentMessage = await this.chatwootService.eventWhatsapp(
Events.MESSAGES_UPSERT,
{ instanceName: this.instance.name },
messageRaw,
);
if (chatwootSentMessage?.id) {
messageRaw.chatwootMessageId = chatwootSentMessage.id;
}
}
const typebotSessionRemoteJid = this.localTypebot.sessions?.find(