From 623c57fe0460437663519148c7201885c1354a84 Mon Sep 17 00:00:00 2001 From: Edgard Date: Wed, 27 Apr 2022 13:41:10 -0300 Subject: [PATCH] fix: Added missing footer option for WPP.chat.sendFileMessage --- src/chat/functions/sendFileMessage.ts | 3 +++ src/whatsapp/misc/MediaPrep.ts | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/chat/functions/sendFileMessage.ts b/src/chat/functions/sendFileMessage.ts index 4c2e19e1ab..22572a4b00 100644 --- a/src/chat/functions/sendFileMessage.ts +++ b/src/chat/functions/sendFileMessage.ts @@ -37,6 +37,7 @@ const debug = Debug('WA-JS:message'); export interface FileMessageOptions extends SendMessageOptions { type: string; caption?: string; + footer?: string; filename?: string; mimetype?: string; } @@ -204,6 +205,7 @@ export async function sendFileMessage( { caption: options.caption || filename, filename: filename, + footer: options.footer, }, options ); @@ -219,6 +221,7 @@ export async function sendFileMessage( debug(`sending message (${options.type}) with id ${rawMessage.id}`); const sendMsgResult = mediaPrep.sendToChat(chat, { caption: options.caption, + footer: options.footer, isViewOnce, productMsgOptions: rawMessage, }); diff --git a/src/whatsapp/misc/MediaPrep.ts b/src/whatsapp/misc/MediaPrep.ts index b8eb6c68a2..10c13d046b 100644 --- a/src/whatsapp/misc/MediaPrep.ts +++ b/src/whatsapp/misc/MediaPrep.ts @@ -44,9 +44,10 @@ export declare namespace MediaPrep { e: ChatModel, options: { caption?: string; + footer?: string; quotedMsg?: MsgModel; productMsgOptions?: ModelPropertiesContructor; - type?: any; + type?: null | string; mentionedJidList?: any; isForwarded?: boolean; forwardingScore?: any;