From 4b9dca24016ef8ce75280da9503c311b90fba2b4 Mon Sep 17 00:00:00 2001 From: adriano Date: Mon, 1 Apr 2024 17:06:11 -0300 Subject: [PATCH] fix: Bug when send remote message --- backend/src/controllers/TicketController.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/controllers/TicketController.ts b/backend/src/controllers/TicketController.ts index e8f327c..7b8aefb 100644 --- a/backend/src/controllers/TicketController.ts +++ b/backend/src/controllers/TicketController.ts @@ -75,10 +75,10 @@ import GetProfilePicUrl from "../services/WbotServices/GetProfilePicUrl"; import CreateContactService from "../services/ContactServices/CreateContactService"; import { botSendMessage } from "../services/WbotServices/wbotMessageListener"; import WhatsappQueue from "../models/WhatsappQueue"; -import { get } from "../helpers/RedisClient" -import CountStatusChatEndService from "../services/StatusChatEndService/CountStatusChatEndService" +import { get } from "../helpers/RedisClient"; +import CountStatusChatEndService from "../services/StatusChatEndService/CountStatusChatEndService"; -export const index = async (req: Request, res: Response): Promise => { +export const index = async (req: Request, res: Response): Promise => { const { pageNumber, status, @@ -110,8 +110,8 @@ export const index = async (req: Request, res: Response): Promise => { withUnreadMessages, unlimited, searchParamContent - }); - + }); + return res.status(200).json({ tickets, count, hasMore }); }; @@ -149,7 +149,7 @@ export const remoteTicketCreation = async ( const queue: any = await WhatsappQueue.findOne({ where: { whatsappId }, attributes: ["queueId"] - }); + }); const { queueId } = queue; @@ -213,7 +213,7 @@ export const remoteTicketCreation = async ( undefined, queueId ); - botSendMessage(ticket, msg); + botSendMessage(ticket, `\u200e${msg}`); } const io = getIO();