mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
fix: reply with media message
This commit is contained in:
@@ -835,6 +835,7 @@ export class ChatwootService {
|
||||
instance?: InstanceDto,
|
||||
messageBody?: any,
|
||||
sourceId?: string,
|
||||
quotedMsg?: MessageModel,
|
||||
) {
|
||||
const data = new FormData();
|
||||
|
||||
@@ -846,6 +847,8 @@ export class ChatwootService {
|
||||
|
||||
data.append('attachments[]', createReadStream(file));
|
||||
|
||||
const sourceReplyId = quotedMsg?.chatwootMessageId || null;
|
||||
|
||||
if (messageBody && instance) {
|
||||
const replyToIds = await this.getReplyToIds(messageBody, instance);
|
||||
|
||||
@@ -856,6 +859,10 @@ export class ChatwootService {
|
||||
}
|
||||
}
|
||||
|
||||
if (sourceReplyId) {
|
||||
data.append('source_reply_id', sourceReplyId.toString());
|
||||
}
|
||||
|
||||
if (sourceId) {
|
||||
data.append('source_id', sourceId);
|
||||
}
|
||||
@@ -1820,6 +1827,7 @@ export class ChatwootService {
|
||||
instance,
|
||||
body,
|
||||
'WAID:' + body.key.id,
|
||||
quotedMsg,
|
||||
);
|
||||
|
||||
if (!send) {
|
||||
@@ -1837,6 +1845,7 @@ export class ChatwootService {
|
||||
instance,
|
||||
body,
|
||||
'WAID:' + body.key.id,
|
||||
quotedMsg,
|
||||
);
|
||||
|
||||
if (!send) {
|
||||
|
||||
Reference in New Issue
Block a user