mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 11:49:19 +00:00
code cleanup
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user