From cb413febaa7017e3efd845947a6f683f511190c5 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Sun, 29 Jun 2025 16:47:37 +0700 Subject: [PATCH] [core] Handle WhatsApp News profile picture --- src/core/abc/session.abc.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/core/abc/session.abc.ts b/src/core/abc/session.abc.ts index 398fec37..896cd198 100644 --- a/src/core/abc/session.abc.ts +++ b/src/core/abc/session.abc.ts @@ -682,10 +682,17 @@ export abstract class WhatsappSession { } protected async refreshProfilePicture(id: string) { - let fn: Promise; - if (isJidBroadcast(id)) { + this.logger.debug(`Refreshing profile picture for id "${id}"...`); + // Have no pictures + if (id === '0@c.us' || id === '0@s.whatsapp.net') { return null; - } else if (isJidNewsletter(id)) { + } else if (isJidBroadcast(id)) { + return null; + } + + // Find the right method + let fn: Promise; + if (isJidNewsletter(id)) { fn = this.channelsGetChannel(id).then( (channel: Channel) => channel.picture || channel.preview, );