diff --git a/src/chat/functions/sendFileMessage.ts b/src/chat/functions/sendFileMessage.ts index dc38ab5b9e..f03f1a276a 100644 --- a/src/chat/functions/sendFileMessage.ts +++ b/src/chat/functions/sendFileMessage.ts @@ -289,6 +289,7 @@ export async function sendFileMessage( caption: options.caption || filename, filename: filename, footer: options.footer, + isCaptionByUser: options.caption != undefined, }, options ); @@ -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((resolve) => { diff --git a/src/whatsapp/models/MsgModel.ts b/src/whatsapp/models/MsgModel.ts index acdfb4ea2b..40700684a2 100644 --- a/src/whatsapp/models/MsgModel.ts +++ b/src/whatsapp/models/MsgModel.ts @@ -202,6 +202,7 @@ interface Props { totalCurrencyCode?: any; historySyncMetaData?: any; mdDowngrade?: any; + isCaptionByUser: boolean; isSendFailure: boolean; appStateSyncKeyShare?: any; appStateSyncKeyRequest?: any;