More accurate phone connection detection

This commit is contained in:
Adhiraj Singh
2020-10-15 16:50:52 +05:30
parent 16b138c759
commit e2d5fb1a25
10 changed files with 95 additions and 62 deletions

View File

@@ -1,4 +1,4 @@
import { WAConnection, MessageLogLevel, MessageOptions, MessageType, unixTimestampSeconds, toNumber, GET_MESSAGE_ID, waMessageKey } from '../WAConnection/WAConnection'
import { WAConnection, MessageOptions, MessageType, unixTimestampSeconds, toNumber, GET_MESSAGE_ID, waMessageKey } from '../WAConnection/WAConnection'
import * as assert from 'assert'
import {promises as fs} from 'fs'
@@ -21,7 +21,7 @@ export const WAConnectionTest = (name: string, func: (conn: WAConnection) => voi
describe(name, () => {
const conn = new WAConnection()
conn.connectOptions.maxIdleTimeMs = 30_000
conn.logLevel = MessageLogLevel.unhandled
conn.logger.level = 'debug'
before(async () => {
const file = './auth_info.json'