diff --git a/src/core/engines/noweb/session.noweb.core.ts b/src/core/engines/noweb/session.noweb.core.ts index 51f80c67..87344d61 100644 --- a/src/core/engines/noweb/session.noweb.core.ts +++ b/src/core/engines/noweb/session.noweb.core.ts @@ -1113,8 +1113,18 @@ export class WhatsappSessionNoWebCore extends WhatsappSession { if (isJidStatusBroadcast(id)) { return null; } - const url = await this.sock.profilePictureUrl(contact, 'image'); - return url; + try { + const url = await this.sock.profilePictureUrl(contact, 'image'); + return url; + } catch (err) { + if (err.message == 'item-not-found') { + return null; + } + if (err.message == 'not-authorized') { + return null; + } + throw err; + } } public async blockContact(request: ContactRequest) {