code cleanup

This commit is contained in:
canove
2020-09-22 10:18:38 -03:00
parent 48dbf7e859
commit 6bc3b216c8
21 changed files with 12 additions and 1276 deletions

View File

@@ -15,14 +15,12 @@ const SendWhatsAppMedia = async ({
const newMedia = MessageMedia.fromFilePath(media.path);
const mediaUrl = media.filename;
const sentMessage = await wbot.sendMessage(
`${ticket.contact.number}@c.us`,
newMedia
);
await ticket.update({ lastMessage: mediaUrl });
await ticket.update({ lastMessage: media.filename });
return sentMessage;
};