aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 8ef7f47..d4fdd03 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -411,8 +411,8 @@ namespace QuickMedia {
user_info->avatar_url = std::move(avatar_url_str);
if(strncmp(user_info->avatar_url.c_str(), "mxc://", 6) == 0)
user_info->avatar_url.erase(user_info->avatar_url.begin(), user_info->avatar_url.begin() + 6);
- // TODO: What if the user hasn't selected an avatar?
- user_info->avatar_url = homeserver + "/_matrix/media/r0/thumbnail/" + user_info->avatar_url + "?width=32&height=32&method=crop";
+ if(!user_info->avatar_url.empty())
+ user_info->avatar_url = homeserver + "/_matrix/media/r0/thumbnail/" + user_info->avatar_url + "?width=32&height=32&method=crop";
user_info->display_name = display_name_json.asString();
user_info->display_name_color = user_id_to_color(sender_json_str);