Fix chatwoot not mentioning the quoted message

This commit is contained in:
Judson Cairo 2024-09-04 15:38:11 -03:00
parent b93725dd32
commit 71289fb919

View File

@ -1477,7 +1477,7 @@ export class ChatwootService {
let inReplyToExternalId = null; let inReplyToExternalId = null;
if (msg) { if (msg) {
inReplyToExternalId = msg.message?.extendedTextMessage?.contextInfo?.stanzaId; inReplyToExternalId = msg.message?.extendedTextMessage?.contextInfo?.stanzaId ?? msg.contextInfo?.stanzaId;
if (inReplyToExternalId) { if (inReplyToExternalId) {
const message = await this.getMessageByKeyId(instance, inReplyToExternalId); const message = await this.getMessageByKeyId(instance, inReplyToExternalId);
if (message?.chatwootMessageId) { if (message?.chatwootMessageId) {