From 547953eb313b798f7712bee58c59782fe6337e98 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 26 Aug 2024 20:45:32 +0200 Subject: [PATCH] Resolve #1718 --- plugins/avatars/avatars.js | 4 ++++ plugins/avatars/index.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/avatars/avatars.js b/plugins/avatars/avatars.js index 8aef7fa69..464c4f1cc 100644 --- a/plugins/avatars/avatars.js +++ b/plugins/avatars/avatars.js @@ -186,6 +186,10 @@ if (msg?.from?.[0]) { let url = getAvatar(msg), fn = url=>{element.src = url}; + element.onerror = ()=>{ + element.onerror = null; + setIdenticon(msg.from[0], fn); + }; if (url) { fn(url); } else if (msg.avatar?.startsWith('data:')) { diff --git a/plugins/avatars/index.php b/plugins/avatars/index.php index a1a5b921f..4baae52ce 100644 --- a/plugins/avatars/index.php +++ b/plugins/avatars/index.php @@ -10,8 +10,8 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin NAME = 'Avatars', AUTHOR = 'SnappyMail', URL = 'https://snappymail.eu/', - VERSION = '1.19', - RELEASE = '2024-07-08', + VERSION = '1.20', + RELEASE = '2024-08-26', REQUIRED = '2.33.0', CATEGORY = 'Contacts', LICENSE = 'MIT',