Skip to content

Commit

Permalink
Fix: Conseguir responder mensagem dentro de grupos
Browse files Browse the repository at this point in the history
  • Loading branch information
T3uZ committed Oct 30, 2024
1 parent 74e320b commit c11e07d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions backend/src/helpers/SerializeWbotMsgId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
export default SerializeWbotMsgId;

0 comments on commit c11e07d

Please sign in to comment.