feat: added new method to fetch old whatsapp messages

This commit is contained in:
canove
2020-10-30 10:37:57 -03:00
parent 5a51581bd3
commit 099a3354ca
14 changed files with 116 additions and 36 deletions

View File

@@ -0,0 +1,12 @@
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;