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;