mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
fix: reply message
This commit is contained in:
parent
31258a9b85
commit
f551242e86
@ -725,8 +725,6 @@ export class ChatwootService {
|
|||||||
|
|
||||||
const sourceReplyId = quotedMsg?.chatwootMessageId || null;
|
const sourceReplyId = quotedMsg?.chatwootMessageId || null;
|
||||||
|
|
||||||
console.log('sourceReplyId', sourceReplyId);
|
|
||||||
|
|
||||||
const message = await client.messages.create({
|
const message = await client.messages.create({
|
||||||
accountId: this.provider.accountId,
|
accountId: this.provider.accountId,
|
||||||
conversationId: conversationId,
|
conversationId: conversationId,
|
||||||
@ -1440,7 +1438,7 @@ export class ChatwootService {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const key = message.key as {
|
const key = message?.key as {
|
||||||
id: string;
|
id: string;
|
||||||
fromMe: boolean;
|
fromMe: boolean;
|
||||||
remoteJid: string;
|
remoteJid: string;
|
||||||
@ -1747,8 +1745,6 @@ export class ChatwootService {
|
|||||||
|
|
||||||
const quotedId = body.contextInfo?.stanzaId || body.message?.contextInfo?.stanzaId;
|
const quotedId = body.contextInfo?.stanzaId || body.message?.contextInfo?.stanzaId;
|
||||||
|
|
||||||
console.log('quotedId', quotedId);
|
|
||||||
|
|
||||||
let quotedMsg = null;
|
let quotedMsg = null;
|
||||||
|
|
||||||
if (quotedId)
|
if (quotedId)
|
||||||
@ -1761,8 +1757,6 @@ export class ChatwootService {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('quotedMsg', quotedMsg);
|
|
||||||
|
|
||||||
const isMedia = this.isMediaMessage(body.message);
|
const isMedia = this.isMediaMessage(body.message);
|
||||||
|
|
||||||
const adsMessage = this.getAdsMessage(body.message);
|
const adsMessage = this.getAdsMessage(body.message);
|
||||||
|
@ -1124,7 +1124,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
this.localWebhook.webhookBase64 === true ||
|
this.localWebhook.webhookBase64 === true ||
|
||||||
(this.configService.get<Typebot>('TYPEBOT').SEND_MEDIA_BASE64 && isMedia)
|
(this.configService.get<Typebot>('TYPEBOT').SEND_MEDIA_BASE64 && isMedia)
|
||||||
) {
|
) {
|
||||||
console.log('Download media');
|
|
||||||
const buffer = await downloadMediaMessage(
|
const buffer = await downloadMediaMessage(
|
||||||
{ key: received.key, message: received?.message },
|
{ key: received.key, message: received?.message },
|
||||||
'buffer',
|
'buffer',
|
||||||
@ -1173,10 +1172,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
|
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
|
||||||
|
|
||||||
await this.prismaRepository.message.create({
|
|
||||||
data: messageRaw,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.configService.get<Chatwoot>('CHATWOOT').ENABLED &&
|
this.configService.get<Chatwoot>('CHATWOOT').ENABLED &&
|
||||||
this.localChatwoot.enabled &&
|
this.localChatwoot.enabled &&
|
||||||
@ -1195,6 +1190,10 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await this.prismaRepository.message.create({
|
||||||
|
data: messageRaw,
|
||||||
|
});
|
||||||
|
|
||||||
if (this.configService.get<Typebot>('TYPEBOT').ENABLED) {
|
if (this.configService.get<Typebot>('TYPEBOT').ENABLED) {
|
||||||
if (type === 'notify') {
|
if (type === 'notify') {
|
||||||
if (messageRaw.messageType !== 'reactionMessage')
|
if (messageRaw.messageType !== 'reactionMessage')
|
||||||
|
Loading…
Reference in New Issue
Block a user