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, 1 insertions, 3 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index dec4a68..4de7045 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -390,8 +390,6 @@ namespace QuickMedia {
avatar_url_str = avatar_url_json.asString();
const Json::Value &display_name_json = content_json["displayname"];
- if(!display_name_json.isString())
- continue;
std::string sender_json_str = sender_json.asString();
@@ -402,7 +400,7 @@ namespace QuickMedia {
user_info->avatar_url.erase(user_info->avatar_url.begin(), user_info->avatar_url.begin() + 6);
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 = display_name_json.isString() ? display_name_json.asString() : sender_json_str;
user_info->display_name_color = user_id_to_color(sender_json_str);
// Overwrites user data