Alteração para o auto reestore acontecer quando o status mudar para PAIRING

pull/20/head
adriano 2022-12-25 11:06:33 -03:00
parent 1b603a7216
commit f3ca9f74db
3 changed files with 3 additions and 2 deletions

View File

@ -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([]);
}

View File

@ -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 []
}

View File

@ -69,6 +69,7 @@ export const StartWhatsAppSession = async (whatsapp: Whatsapp, backupSession: bo
let whatsappStatus = ["CONFLICT",
"DEPRECATED_VERSION",
"OPENING",
"PAIRING",
"PROXYBLOCK",
"SMB_TOS_BLOCK",
"TIMEOUT",