Skip to content

Commit

Permalink
fix: Added missing footer option for WPP.chat.sendFileMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Apr 27, 2022
1 parent 5525bca commit 623c57f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/chat/functions/sendFileMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -204,6 +205,7 @@ export async function sendFileMessage(
{
caption: options.caption || filename,
filename: filename,
footer: options.footer,
},
options
);
Expand All @@ -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,
});
Expand Down
3 changes: 2 additions & 1 deletion src/whatsapp/misc/MediaPrep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ export declare namespace MediaPrep {
e: ChatModel,
options: {
caption?: string;
footer?: string;
quotedMsg?: MsgModel;
productMsgOptions?: ModelPropertiesContructor<MsgModel>;
type?: any;
type?: null | string;
mentionedJidList?: any;
isForwarded?: boolean;
forwardingScore?: any;
Expand Down

0 comments on commit 623c57f

Please sign in to comment.