mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: Fixed reconnect with pairing code or qrcode
This commit is contained in:
parent
7d6a130cf9
commit
f7293255cf
@ -1,3 +1,9 @@
|
|||||||
|
# 1.4.1 (homolog)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Fixed reconnect with pairing code or qrcode
|
||||||
|
|
||||||
# 1.4.0 (2023-07-24 17:03)
|
# 1.4.0 (2023-07-24 17:03)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
@ -107,7 +107,7 @@ export class InstanceController {
|
|||||||
if (qrcode) {
|
if (qrcode) {
|
||||||
this.logger.verbose('creating qrcode');
|
this.logger.verbose('creating qrcode');
|
||||||
await instance.connectToWhatsapp(number);
|
await instance.connectToWhatsapp(number);
|
||||||
await delay(3000);
|
await delay(5000);
|
||||||
getQrcode = instance.qrCode;
|
getQrcode = instance.qrCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ export class InstanceController {
|
|||||||
this.logger.verbose('connecting');
|
this.logger.verbose('connecting');
|
||||||
await instance.connectToWhatsapp(number);
|
await instance.connectToWhatsapp(number);
|
||||||
|
|
||||||
await delay(2000);
|
await delay(5000);
|
||||||
return instance.qrCode;
|
return instance.qrCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,11 +606,14 @@ export class WAStartupService {
|
|||||||
color: { light: '#ffffff', dark: '#198754' },
|
color: { light: '#ffffff', dark: '#198754' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(this.phoneNumber);
|
||||||
if (this.phoneNumber) {
|
if (this.phoneNumber) {
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
this.instance.qrcode.pairingCode = await this.client.requestPairingCode(
|
this.instance.qrcode.pairingCode = await this.client.requestPairingCode(
|
||||||
this.phoneNumber,
|
this.phoneNumber,
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
this.instance.qrcode.pairingCode = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.verbose('Generating QR code');
|
this.logger.verbose('Generating QR code');
|
||||||
@ -894,13 +897,6 @@ export class WAStartupService {
|
|||||||
|
|
||||||
this.phoneNumber = number;
|
this.phoneNumber = number;
|
||||||
|
|
||||||
// if (number) {
|
|
||||||
// this.logger.verbose('creating pairing code');
|
|
||||||
// await delay(5000);
|
|
||||||
// this.phoneNumber = number;
|
|
||||||
// this.instance.qrcode.pairingCode = await this.client.requestPairingCode(number);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return this.client;
|
return this.client;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error(error);
|
this.logger.error(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user