mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
fix: reply with media message
This commit is contained in:
parent
99ebb81838
commit
2eb09c1853
@ -1,7 +1,7 @@
|
|||||||
FROM node:20-alpine AS builder
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add git ffmpeg wget curl bash
|
apk add git bash --no-cache
|
||||||
|
|
||||||
LABEL version="2.0.0" description="Api to control whatsapp features through http requests."
|
LABEL version="2.0.0" description="Api to control whatsapp features through http requests."
|
||||||
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes"
|
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes"
|
||||||
@ -30,7 +30,7 @@ RUN npm run build
|
|||||||
FROM node:20-alpine AS final
|
FROM node:20-alpine AS final
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add tzdata ffmpeg
|
apk add tzdata ffmpeg --no-cache
|
||||||
|
|
||||||
ENV TZ=America/Sao_Paulo
|
ENV TZ=America/Sao_Paulo
|
||||||
|
|
||||||
|
@ -835,6 +835,7 @@ export class ChatwootService {
|
|||||||
instance?: InstanceDto,
|
instance?: InstanceDto,
|
||||||
messageBody?: any,
|
messageBody?: any,
|
||||||
sourceId?: string,
|
sourceId?: string,
|
||||||
|
quotedMsg?: MessageModel,
|
||||||
) {
|
) {
|
||||||
const data = new FormData();
|
const data = new FormData();
|
||||||
|
|
||||||
@ -846,6 +847,8 @@ export class ChatwootService {
|
|||||||
|
|
||||||
data.append('attachments[]', createReadStream(file));
|
data.append('attachments[]', createReadStream(file));
|
||||||
|
|
||||||
|
const sourceReplyId = quotedMsg?.chatwootMessageId || null;
|
||||||
|
|
||||||
if (messageBody && instance) {
|
if (messageBody && instance) {
|
||||||
const replyToIds = await this.getReplyToIds(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) {
|
if (sourceId) {
|
||||||
data.append('source_id', sourceId);
|
data.append('source_id', sourceId);
|
||||||
}
|
}
|
||||||
@ -1820,6 +1827,7 @@ export class ChatwootService {
|
|||||||
instance,
|
instance,
|
||||||
body,
|
body,
|
||||||
'WAID:' + body.key.id,
|
'WAID:' + body.key.id,
|
||||||
|
quotedMsg,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!send) {
|
if (!send) {
|
||||||
@ -1837,6 +1845,7 @@ export class ChatwootService {
|
|||||||
instance,
|
instance,
|
||||||
body,
|
body,
|
||||||
'WAID:' + body.key.id,
|
'WAID:' + body.key.id,
|
||||||
|
quotedMsg,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!send) {
|
if (!send) {
|
||||||
|
Loading…
Reference in New Issue
Block a user