fix: added restart instance when update profile pricture

This commit is contained in:
Davidson Gomes 2023-12-11 18:15:24 -03:00
parent 48f6ee8846
commit 7ee5bcecff

View File

@ -3427,6 +3427,8 @@ export class WAStartupService {
await this.client.updateProfilePicture(this.instance.wuid, pic);
this.logger.verbose('Profile picture updated');
this.reloadConnection();
return { update: 'success' };
} catch (error) {
throw new InternalServerErrorException('Error updating profile picture', error.toString());
@ -3438,6 +3440,8 @@ export class WAStartupService {
try {
await this.client.removeProfilePicture(this.instance.wuid);
this.reloadConnection();
return { update: 'success' };
} catch (error) {
throw new InternalServerErrorException('Error removing profile picture', error.toString());