Merge branch 'master' into refresh-tokens

This commit is contained in:
canove
2020-09-30 19:30:43 -03:00
16 changed files with 150 additions and 78 deletions

View File

@@ -9,7 +9,9 @@ export const GetWbotMessage = async (
): Promise<WbotMessage> => {
const wbot = await GetTicketWbot(ticket);
const wbotChat = await wbot.getChatById(`${ticket.contact.number}@c.us`);
const wbotChat = await wbot.getChatById(
`${ticket.contact.number}@${ticket.isGroup ? "g" : "c"}.us`
);
try {
const chatMessages = await wbotChat.fetchMessages({ limit: 20 });