mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 20:59:16 +00:00
improvement: send audio messages as whatsapp audio
This commit is contained in:
@@ -20,7 +20,8 @@ const SendWhatsAppMedia = async ({
|
|||||||
|
|
||||||
const sentMessage = await wbot.sendMessage(
|
const sentMessage = await wbot.sendMessage(
|
||||||
`${ticket.contact.number}@${ticket.isGroup ? "g" : "c"}.us`,
|
`${ticket.contact.number}@${ticket.isGroup ? "g" : "c"}.us`,
|
||||||
newMedia
|
newMedia,
|
||||||
|
{ sendAudioAsVoice: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
await ticket.update({ lastMessage: media.filename });
|
await ticket.update({ lastMessage: media.filename });
|
||||||
|
|||||||
Reference in New Issue
Block a user