From 7ee5bcecff8fe67a6db43d8ecdc582e16636e266 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Mon, 11 Dec 2023 18:15:24 -0300 Subject: [PATCH] fix: added restart instance when update profile pricture --- src/whatsapp/services/whatsapp.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/whatsapp/services/whatsapp.service.ts b/src/whatsapp/services/whatsapp.service.ts index c673d245..cc05a824 100644 --- a/src/whatsapp/services/whatsapp.service.ts +++ b/src/whatsapp/services/whatsapp.service.ts @@ -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());