[core] NOWEB - log errors on profile picture change

fix #873
This commit is contained in:
devlikepro committed 2025-03-27 14:36:36 +07:00
1 parent ec7c0a5cb7
commit 9f5413963b
1 file changed
+6 -1
@@ -364,7 +364,12 @@ export class NowebPersistentStore implements INowebStore {
if (update.imgUrl === 'changed') {
contact.imgUrl = this.socket
? await this.socket?.profilePictureUrl(contact.id)
? await this.socket?.profilePictureUrl(contact.id).catch((error) => {
this.logger.warn(
`failed to get profile picture for contact '${contact.id}': ${error}`,
);
return undefined;
})
: undefined;
} else if (update.imgUrl === 'removed') {
delete contact.imgUrl;