mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: Adjusts the quoted message, now has contextInfo in the message Raw
This commit is contained in:
parent
380ba8860c
commit
306c6dd21d
@ -11,6 +11,7 @@
|
||||
* When possible use the original file extension
|
||||
* When receiving a file from whatsapp, use the original filename in chatwoot if possible
|
||||
* Remove message ids cache in chatwoot to use chatwoot's api itself
|
||||
* Adjusts the quoted message, now has contextInfo in the message Raw
|
||||
|
||||
# 1.6.1 (2023-12-22 11:43)
|
||||
|
||||
|
@ -29,6 +29,7 @@ export class MessageRaw {
|
||||
source_id?: string;
|
||||
source_reply_id?: string;
|
||||
chatwoot?: ChatwootMessage;
|
||||
contextInfo?: any;
|
||||
}
|
||||
|
||||
const messageSchema = new Schema<MessageRaw>({
|
||||
|
@ -1029,6 +1029,8 @@ export class WAStartupService {
|
||||
|
||||
const localUrl = this.localWebhook.url;
|
||||
|
||||
console.log(data);
|
||||
|
||||
if (this.configService.get<Log>('LOG').LEVEL.includes('WEBHOOKS')) {
|
||||
const logData = {
|
||||
local: WAStartupService.name + '.sendDataWebhook-global',
|
||||
@ -1756,6 +1758,8 @@ export class WAStartupService {
|
||||
received?.message?.documentMessage ||
|
||||
received?.message?.audioMessage;
|
||||
|
||||
const contentMsg = received.message[getContentType(received.message)] as any;
|
||||
|
||||
if (this.localWebhook.webhook_base64 === true && isMedia) {
|
||||
const buffer = await downloadMediaMessage(
|
||||
{ key: received.key, message: received?.message },
|
||||
@ -1773,6 +1777,7 @@ export class WAStartupService {
|
||||
...received.message,
|
||||
base64: buffer ? buffer.toString('base64') : undefined,
|
||||
},
|
||||
contextInfo: contentMsg?.contextInfo,
|
||||
messageType: getContentType(received.message),
|
||||
messageTimestamp: received.messageTimestamp as number,
|
||||
owner: this.instance.name,
|
||||
@ -1783,6 +1788,7 @@ export class WAStartupService {
|
||||
key: received.key,
|
||||
pushName: received.pushName,
|
||||
message: { ...received.message },
|
||||
contextInfo: contentMsg?.contextInfo,
|
||||
messageType: getContentType(received.message),
|
||||
messageTimestamp: received.messageTimestamp as number,
|
||||
owner: this.instance.name,
|
||||
|
Loading…
Reference in New Issue
Block a user