mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
Started migration to material-ui
This commit is contained in:
@@ -32,8 +32,19 @@ module.exports = {
|
||||
wbot.on("auth_failure", msg => {
|
||||
console.error("AUTHENTICATION FAILURE", msg);
|
||||
});
|
||||
wbot.on("ready", () => {
|
||||
wbot.on("ready", async () => {
|
||||
console.log("READY");
|
||||
// const chats = await wbot.getChats(); // pega as mensagens nao lidas (recebidas quando o bot estava offline)
|
||||
// let unreadMessages; // todo > salvar isso no DB pra mostrar no frontend
|
||||
// for (let chat of chats) {
|
||||
// if (chat.unreadCount > 0) {
|
||||
// unreadMessages = await chat.fetchMessages({
|
||||
// limit: chat.unreadCount,
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// console.log(unreadMessages);
|
||||
});
|
||||
|
||||
return wbot;
|
||||
|
||||
Reference in New Issue
Block a user