searching default whatsapp using user link

This commit is contained in:
Ricardo Paes
2022-02-23 11:19:36 -03:00
parent a6a63a0408
commit afb5d68602
5 changed files with 13 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ import Ticket from "../models/Ticket";
const GetTicketWbot = async (ticket: Ticket): Promise<Session> => {
if (!ticket.whatsappId) {
const defaultWhatsapp = await GetDefaultWhatsApp();
const defaultWhatsapp = await GetDefaultWhatsApp(ticket.user.id);
await ticket.$set("whatsapp", defaultWhatsapp);
}