mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 04:12:23 -06:00
Review integration with official WhatsApp API
This commit is contained in:
@@ -721,6 +721,8 @@ export class ChatwootService {
|
||||
|
||||
const sourceReplyId = quotedMsg?.chatwootMessageId || null;
|
||||
|
||||
console.log('sourceReplyId', sourceReplyId);
|
||||
|
||||
const message = await client.messages.create({
|
||||
accountId: this.provider.accountId,
|
||||
conversationId: conversationId,
|
||||
@@ -1734,6 +1736,8 @@ export class ChatwootService {
|
||||
|
||||
const quotedId = body.contextInfo?.stanzaId || body.message?.contextInfo?.stanzaId;
|
||||
|
||||
console.log('quotedId', quotedId);
|
||||
|
||||
let quotedMsg = null;
|
||||
|
||||
if (quotedId)
|
||||
@@ -1746,6 +1750,8 @@ export class ChatwootService {
|
||||
},
|
||||
});
|
||||
|
||||
console.log('quotedMsg', quotedMsg);
|
||||
|
||||
const isMedia = this.isMediaMessage(body.message);
|
||||
|
||||
const adsMessage = this.getAdsMessage(body.message);
|
||||
@@ -1968,8 +1974,6 @@ export class ChatwootService {
|
||||
if (event === Events.MESSAGES_DELETE) {
|
||||
const chatwootDelete = this.configService.get<Chatwoot>('CHATWOOT').MESSAGE_DELETE;
|
||||
|
||||
console.log('chatwootDelete', chatwootDelete);
|
||||
|
||||
if (chatwootDelete === true) {
|
||||
if (!body?.key?.id) {
|
||||
this.logger.warn('message id not found');
|
||||
@@ -1977,7 +1981,6 @@ export class ChatwootService {
|
||||
}
|
||||
|
||||
const message = await this.getMessageByKeyId(instance, body.key.id);
|
||||
console.log('message', message);
|
||||
|
||||
if (message?.chatwootMessageId && message?.chatwootConversationId) {
|
||||
await this.prismaRepository.message.deleteMany({
|
||||
|
||||
@@ -935,7 +935,7 @@ export class TypebotService {
|
||||
|
||||
formattedText = formattedText.replace(/\n$/, '');
|
||||
|
||||
await instance.textMessage(
|
||||
await instance.textMessage(
|
||||
{
|
||||
number: remoteJid.split('@')[0],
|
||||
delay: settings?.delayMessage || 1000,
|
||||
|
||||
Reference in New Issue
Block a user