projeto-hit/backend/src/helpers/SerializeWbotMsgId.ts

13 lines
349 B
TypeScript
Raw Normal View History

import Message from "../models/Message";
import Ticket from "../models/Ticket";
const SerializeWbotMsgId = (ticket: Ticket, message: Message): string => {
const serializedMsgId = `${message.fromMe}_${ticket.contact.number}@${
ticket.isGroup ? "g" : "c"
}.us_${message.id}`;
return serializedMsgId;
};
export default SerializeWbotMsgId;