diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index cd4f637..17bc17b 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -364,6 +364,7 @@ namespace QuickMedia { if(room_name.empty()) room_name = room->id; + string_replace_all(room_name, '\n', ' '); auto body_item = BodyItem::create(std::move(room_name)); body_item->url = room->id; body_item->thumbnail_url = room->get_avatar_url(); @@ -908,7 +909,7 @@ namespace QuickMedia { auto body_item = BodyItem::create(""); body_item->url = user_info.user_id; - body_item->set_author(std::move(display_name)); + body_item->set_author(extract_first_line_remove_newline_elipses(display_name, AUTHOR_MAX_LENGTH)); body_item->set_author_color(user_id_to_color(user_info.user_id)); body_item->set_description(user_info.user_id); body_item->set_description_color(get_current_theme().faded_text_color); @@ -962,7 +963,7 @@ namespace QuickMedia { else display_name = user_info.display_name.value(); - (*it)->set_author(std::move(display_name)); + (*it)->set_author(extract_first_line_remove_newline_elipses(display_name, AUTHOR_MAX_LENGTH)); auto user_body_item = *it; users_body->items.erase(it); |