Skip to content

Commit

Permalink
Merge pull request #140 from T3uZ/reply-groups
Browse files Browse the repository at this point in the history
Fix: Conseguir responder mensagem dentro de grupos
  • Loading branch information
rtenorioh authored Nov 26, 2024
2 parents cc7fc88 + c11e07d commit e8fc2cb
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 e8fc2cb

Please sign in to comment.