mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
updates
This commit is contained in:
@@ -275,6 +275,10 @@ export class WAConnection extends Base {
|
||||
if (this.logLevel === MessageLogLevel.all) {
|
||||
this.log(messageTag + ', ' + JSON.stringify(json), MessageLogLevel.all)
|
||||
}
|
||||
if (!this.phoneConnected) {
|
||||
this.phoneConnected = true
|
||||
this.emit ('connection-phone-change', { connected: true })
|
||||
}
|
||||
/*
|
||||
Check if this is a response to a message we sent
|
||||
*/
|
||||
@@ -340,7 +344,7 @@ export class WAConnection extends Base {
|
||||
|
||||
// poll phone connection as well,
|
||||
// 5000 ms for timeout
|
||||
this.checkPhoneConnection (5000)
|
||||
this.checkPhoneConnection (this.connectOptions.phoneResponseTime || 7500)
|
||||
.then (connected => {
|
||||
this.phoneConnected !== connected && this.emit ('connection-phone-change', {connected})
|
||||
this.phoneConnected = connected
|
||||
|
||||
Reference in New Issue
Block a user