improvement: remove await from "sent seen" method before sending messages.

This commit is contained in:
canove
2021-01-12 08:43:36 -03:00
parent a12c9db731
commit 84e6fe112d
2 changed files with 4 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
const ticket = await ShowTicketService(ticketId);
await SetTicketMessagesAsRead(ticket);
SetTicketMessagesAsRead(ticket);
if (medias) {
await Promise.all(

View File

@@ -182,11 +182,13 @@ const handleMessage = async (
groupContact = await verifyContact(msgGroupContact);
}
const unreadMessages = msg.fromMe ? 0 : chat.unreadCount;
const contact = await verifyContact(msgContact);
const ticket = await FindOrCreateTicketService(
contact,
wbot.id!,
chat.unreadCount,
unreadMessages,
groupContact
);