diff --git a/src/commoncomponents/AvatarImage.qml b/src/commoncomponents/AvatarImage.qml index bfd74876..5215b494 100644 --- a/src/commoncomponents/AvatarImage.qml +++ b/src/commoncomponents/AvatarImage.qml @@ -19,6 +19,7 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import QtQuick.Window 2.14 +import net.jami.Adapters 1.0 import net.jami.Constants 1.0 Item { diff --git a/src/utils.cpp b/src/utils.cpp index 327cdc67..1dc04fad 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -735,7 +735,9 @@ Utils::accountPhoto(const lrc::api::account::Info& accountInfo, const QSize& siz } else { auto bestId = LRCInstance::accountModel().bestIdForAccount(accountInfo.id); auto bestName = LRCInstance::accountModel().bestNameForAccount(accountInfo.id); - QString letterStr = bestId == bestName ? QString() : bestName; + QString letterStr = (bestId == bestName || bestName == accountInfo.profileInfo.uri) + ? QString() + : bestName; QString prefix = accountInfo.profileInfo.type == lrc::api::profile::Type::RING ? "ring:" : "sip:"; photo = fallbackAvatar(prefix + accountInfo.profileInfo.uri, letterStr, size);