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