From c11e07d13d5f788e8ec1756d8eb7bbd7071e4517 Mon Sep 17 00:00:00 2001 From: T3uZ Date: Wed, 30 Oct 2024 16:02:32 -0300 Subject: [PATCH] Fix: Conseguir responder mensagem dentro de grupos --- backend/src/helpers/SerializeWbotMsgId.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/src/helpers/SerializeWbotMsgId.ts b/backend/src/helpers/SerializeWbotMsgId.ts index f78ca2cd..4b5886e1 100644 --- a/backend/src/helpers/SerializeWbotMsgId.ts +++ b/backend/src/helpers/SerializeWbotMsgId.ts @@ -2,13 +2,11 @@ import Message from "../models/Message"; import Ticket from "../models/Ticket"; const SerializeWbotMsgId = (ticket: Ticket, message: Message): string => { - - let SeGrupo = 'g.us_' + message.id + '_'+ message.contact.number + '@c.us'; - let SeIndiv = 'c.us_' + message.id; - - const serializedMsgId = `${message.fromMe}_${ticket.contact.number}@${ticket.isGroup ? SeGrupo : SeIndiv }`; + const serializedMsgId = `${message.fromMe}_${ticket.contact.number}@${ + ticket.isGroup ? "g" : "c" + }.us_${message.id}`; return serializedMsgId; }; -export default SerializeWbotMsgId; \ No newline at end of file +export default SerializeWbotMsgId;