fix: Fix the problem when disconnecting the instance and connecting again using mongodb

This commit is contained in:
Davidson Gomes 2023-12-20 09:55:51 -03:00
parent e8764dd1c6
commit 97b3f9b3c7

View File

@ -1234,15 +1234,17 @@ export class WAStartupService {
this.instance.wuid = this.client.user.id.replace(/:\d+/, '');
this.instance.profilePictureUrl = (await this.profilePicture(this.instance.wuid)).profilePictureUrl;
const formattedWuid = this.instance.wuid.split('@')[0].padEnd(30, ' ');
const formattedName = this.instance.name.split('@')[0].padEnd(30, ' ');
const formattedName = this.instance.name;
this.logger.info(
`
CONNECTED TO WHATSAPP
${formattedWuid}
${formattedName}
`.replace(/^ +/gm, ' '),
);
this.logger.info(`
wuid: ${formattedWuid}
name: ${formattedName}
`);
if (this.localChatwoot.enabled) {
this.chatwootService.eventWhatsapp(