mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Update init method to try login multiple times + use WA ttl for QR gen
This commit is contained in:
@@ -9,6 +9,11 @@ export class WAConnection extends Base {
|
||||
|
||||
constructor () {
|
||||
super ()
|
||||
this.setMaxListeners (30)
|
||||
// on disconnects
|
||||
this.on ('CB:Cmd,type:disconnect', json => (
|
||||
this.state === 'open' && this.unexpectedDisconnect(json[1].kind || 'unknown')
|
||||
))
|
||||
// chats received
|
||||
this.on('CB:response,type:chat', json => {
|
||||
if (json[1].duplicate || !json[2]) return
|
||||
|
||||
Reference in New Issue
Block a user