Alteraçã para o auto restore funcionar quando o status for PAIRING
parent
a59784d18e
commit
ccada53316
|
@ -53,7 +53,7 @@ const redisConn = async () => {
|
||||||
return await conn();
|
return await conn();
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(`There whas an error on redis connection: ${e}`);
|
||||||
return Promise.resolve([]);
|
return Promise.resolve([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ async function searchWhatsappCache(id: string, status: string) {
|
||||||
const number_cache: any = await redis.hgetall(`whatsapp:${id}`)
|
const number_cache: any = await redis.hgetall(`whatsapp:${id}`)
|
||||||
|
|
||||||
if (Object.entries(number_cache).length == 0) {
|
if (Object.entries(number_cache).length == 0) {
|
||||||
redis.quit()
|
await redis.quit()
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ export const StartWhatsAppSession = async (whatsapp: Whatsapp, backupSession: bo
|
||||||
let whatsappStatus = ["CONFLICT",
|
let whatsappStatus = ["CONFLICT",
|
||||||
"DEPRECATED_VERSION",
|
"DEPRECATED_VERSION",
|
||||||
"OPENING",
|
"OPENING",
|
||||||
|
"PAIRING",
|
||||||
"PROXYBLOCK",
|
"PROXYBLOCK",
|
||||||
"SMB_TOS_BLOCK",
|
"SMB_TOS_BLOCK",
|
||||||
"TIMEOUT",
|
"TIMEOUT",
|
||||||
|
|
Loading…
Reference in New Issue