improvement: removed await from "sendSeen" method to improve performance

This commit is contained in:
canove
2020-10-17 11:48:49 -03:00
parent e0c1b0eec5
commit d7d953d812

View File

@@ -16,10 +16,11 @@ const SetTicketMessagesAsRead = async (ticket: Ticket): Promise<void> => {
try {
const wbot = await GetTicketWbot(ticket);
await wbot.sendSeen(`${ticket.contact.number}@c.us`);
wbot.sendSeen(`${ticket.contact.number}@c.us`);
} catch (err) {
console.log(
"Could not mark messages as read. Maybe whatsapp session disconnected?"
"Could not mark messages as read. Maybe whatsapp session disconnected?",
err
);
}