improvement: send audio messages as whatsapp audio

This commit is contained in:
canove
2020-10-05 19:53:36 -03:00
parent eb49531924
commit 228c087d51

View File

@@ -20,7 +20,8 @@ const SendWhatsAppMedia = async ({
const sentMessage = await wbot.sendMessage(
`${ticket.contact.number}@${ticket.isGroup ? "g" : "c"}.us`,
newMedia
newMedia,
{ sendAudioAsVoice: true }
);
await ticket.update({ lastMessage: media.filename });