mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-20 02:06:43 -06:00
fix: logout wa business instance
This commit is contained in:
parent
bc6944736e
commit
a931ee7afb
@ -664,11 +664,7 @@ export class InstanceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.logger.verbose('logging out instance: ' + instanceName);
|
this.waMonitor.waInstances[instanceName]?.logoutInstance();
|
||||||
await this.waMonitor.waInstances[instanceName]?.client?.logout('Log out instance: ' + instanceName);
|
|
||||||
|
|
||||||
this.logger.verbose('close connection instance: ' + instanceName);
|
|
||||||
this.waMonitor.waInstances[instanceName]?.client?.ws?.close();
|
|
||||||
|
|
||||||
return { status: 'SUCCESS', error: false, response: { message: 'Instance logged out' } };
|
return { status: 'SUCCESS', error: false, response: { message: 'Instance logged out' } };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -147,6 +147,14 @@ export class BaileysStartupService extends WAStartupService {
|
|||||||
return this.stateConnection;
|
return this.stateConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async logoutInstance() {
|
||||||
|
this.logger.verbose('logging out instance: ' + this.instanceName);
|
||||||
|
await this.client?.logout('Log out instance: ' + this.instanceName);
|
||||||
|
|
||||||
|
this.logger.verbose('close connection instance: ' + this.instanceName);
|
||||||
|
this.client?.ws?.close();
|
||||||
|
}
|
||||||
|
|
||||||
public async getProfileName() {
|
public async getProfileName() {
|
||||||
this.logger.verbose('Getting profile name');
|
this.logger.verbose('Getting profile name');
|
||||||
|
|
||||||
|
@ -64,6 +64,11 @@ export class BusinessStartupService extends WAStartupService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async logoutInstance() {
|
||||||
|
this.logger.verbose('Logging out instance');
|
||||||
|
await this.closeClient();
|
||||||
|
}
|
||||||
|
|
||||||
private async post(message: any, params: string) {
|
private async post(message: any, params: string) {
|
||||||
try {
|
try {
|
||||||
const integration = await this.findIntegration();
|
const integration = await this.findIntegration();
|
||||||
|
Loading…
Reference in New Issue
Block a user