mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
improvement: remove await from "sent seen" method before sending messages.
This commit is contained in:
@@ -42,7 +42,7 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
|
|||||||
|
|
||||||
const ticket = await ShowTicketService(ticketId);
|
const ticket = await ShowTicketService(ticketId);
|
||||||
|
|
||||||
await SetTicketMessagesAsRead(ticket);
|
SetTicketMessagesAsRead(ticket);
|
||||||
|
|
||||||
if (medias) {
|
if (medias) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|||||||
@@ -182,11 +182,13 @@ const handleMessage = async (
|
|||||||
groupContact = await verifyContact(msgGroupContact);
|
groupContact = await verifyContact(msgGroupContact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const unreadMessages = msg.fromMe ? 0 : chat.unreadCount;
|
||||||
|
|
||||||
const contact = await verifyContact(msgContact);
|
const contact = await verifyContact(msgContact);
|
||||||
const ticket = await FindOrCreateTicketService(
|
const ticket = await FindOrCreateTicketService(
|
||||||
contact,
|
contact,
|
||||||
wbot.id!,
|
wbot.id!,
|
||||||
chat.unreadCount,
|
unreadMessages,
|
||||||
groupContact
|
groupContact
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user