From e8e9fd30c939d56a7e343a7ba31fae7e0264d36a Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Thu, 27 Jul 2023 10:46:24 -0400
Subject: [PATCH] avatars: fix missing avatars

Strip whitespace for avatars pulled from conversation info.

Gitlab: #1246
Change-Id: I767a53ee3e492507f9cb80b802a9eaaaa66d3d50
---
 src/libclient/conversationmodel.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libclient/conversationmodel.cpp b/src/libclient/conversationmodel.cpp
index 8ca0d219d..fa0331bd9 100644
--- a/src/libclient/conversationmodel.cpp
+++ b/src/libclient/conversationmodel.cpp
@@ -1237,7 +1237,9 @@ ConversationModel::avatar(const QString& conversationId) const
         // In this case, we can just display contact name
         return owner.contactModel->avatar(peer.at(0));
     }
-    return conversation.infos["avatar"];
+    // We need to strip the whitespace characters for the avatar
+    // when it comes from the conversation info.
+    return conversation.infos["avatar"].simplified();
 }
 
 void
-- 
GitLab