Skip to content

Commit

Permalink
fix: Throw error for invalid media type (wppconnect-team/wppconnect#1164
Browse files Browse the repository at this point in the history
)
  • Loading branch information
edgardmessias committed Jun 18, 2022
1 parent bf8e20a commit 0481c8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/chat/functions/sendFileMessage.ts
Expand Up @@ -222,6 +222,8 @@ export async function sendFileMessage(
await markIsRead(chat.id).catch(() => null);
}

await mediaPrep.waitForPrep();

debug(`sending message (${options.type}) with id ${rawMessage.id}`);
const sendMsgResult = mediaPrep.sendToChat(chat, {
caption: options.caption,
Expand Down

0 comments on commit 0481c8b

Please sign in to comment.