From f3ca9f74db2a642a4085572e59776562cb69a67e Mon Sep 17 00:00:00 2001 From: adriano Date: Sun, 25 Dec 2022 11:06:33 -0300 Subject: [PATCH] =?UTF-8?q?Altera=C3=A7=C3=A3o=20para=20o=20auto=20reestor?= =?UTF-8?q?e=20acontecer=20quando=20o=20status=20mudar=20para=20PAIRING?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/helpers/TicketCache.ts | 2 +- backend/src/helpers/WhatsCache.ts | 2 +- backend/src/services/WbotServices/StartWhatsAppSession.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/helpers/TicketCache.ts b/backend/src/helpers/TicketCache.ts index b09b31d..1a68fe1 100644 --- a/backend/src/helpers/TicketCache.ts +++ b/backend/src/helpers/TicketCache.ts @@ -53,7 +53,7 @@ const redisConn = async () => { return await conn(); } catch (e) { - console.error(e); + console.error(`There whas an error on redis connection: ${e}`); return Promise.resolve([]); } diff --git a/backend/src/helpers/WhatsCache.ts b/backend/src/helpers/WhatsCache.ts index a4764bf..26e5328 100644 --- a/backend/src/helpers/WhatsCache.ts +++ b/backend/src/helpers/WhatsCache.ts @@ -117,7 +117,7 @@ async function searchWhatsappCache(id: string, status: string) { const number_cache: any = await redis.hgetall(`whatsapp:${id}`) if(Object.entries(number_cache).length == 0){ - redis.quit() + await redis.quit() return [] } diff --git a/backend/src/services/WbotServices/StartWhatsAppSession.ts b/backend/src/services/WbotServices/StartWhatsAppSession.ts index 60f9162..889876a 100644 --- a/backend/src/services/WbotServices/StartWhatsAppSession.ts +++ b/backend/src/services/WbotServices/StartWhatsAppSession.ts @@ -69,6 +69,7 @@ export const StartWhatsAppSession = async (whatsapp: Whatsapp, backupSession: bo let whatsappStatus = ["CONFLICT", "DEPRECATED_VERSION", "OPENING", + "PAIRING", "PROXYBLOCK", "SMB_TOS_BLOCK", "TIMEOUT",