mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 03:39:29 +00:00
🐛 Fixing error when sending messages
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { getIO } from "../../libs/socket";
|
||||
import Message from "../../models/Message";
|
||||
import Ticket from "../../models/Ticket";
|
||||
import Whatsapp from "../../models/Whatsapp";
|
||||
|
||||
interface MessageData {
|
||||
id: string;
|
||||
@@ -27,7 +28,14 @@ const CreateMessageService = async ({
|
||||
{
|
||||
model: Ticket,
|
||||
as: "ticket",
|
||||
include: ["contact", "queue"]
|
||||
include: [
|
||||
"contact", "queue",
|
||||
{
|
||||
model: Whatsapp,
|
||||
as: "whatsapp",
|
||||
attributes: ["name"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
model: Message,
|
||||
|
||||
Reference in New Issue
Block a user