diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-10-15 17:49:39 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-10-15 17:49:39 +0200 |
commit | c23ceac642ea95081a239c7af9f882082addb8c1 (patch) | |
tree | ee2c8302dc4fa21814f43c2ad50c44c05a3069dc /src/plugins | |
parent | 83a4df36832156d08fbf04294164979efcaa06ab (diff) |
Matrix: show users without a username (as user id)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 4 |
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 |