Skip to content

Commit

Permalink
fix: Fixed caption in send file message (close #1736) (#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta authored Mar 20, 2024
1 parent d58e6d7 commit 42f4689
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chat/functions/sendFileMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export async function sendFileMessage(
caption: options.caption || filename,
filename: filename,
footer: options.footer,
isCaptionByUser: options.caption != undefined,
},
options
);
Expand All @@ -307,14 +308,13 @@ export async function sendFileMessage(
(mediaPrep as any)._mediaData.fullHeight = 1128;
(mediaPrep as any)._mediaData.fullWidth = 1128;
}

debug(`sending message (${options.type}) with id ${rawMessage.id}`);
const sendMsgResult = mediaPrep.sendToChat(chat, {
caption: options.caption,
footer: options.footer,
isViewOnce,
productMsgOptions: rawMessage,
});
} as any);

// Wait for message register
const message = await new Promise<MsgModel>((resolve) => {
Expand Down
1 change: 1 addition & 0 deletions src/whatsapp/models/MsgModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ interface Props {
totalCurrencyCode?: any;
historySyncMetaData?: any;
mdDowngrade?: any;
isCaptionByUser: boolean;
isSendFailure: boolean;
appStateSyncKeyShare?: any;
appStateSyncKeyRequest?: any;
Expand Down

0 comments on commit 42f4689

Please sign in to comment.