diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 5a85e8e..96ce789 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -376,7 +376,7 @@ namespace QuickMedia { // TODO: Binary search? Message *last_unread_message = nullptr; for(auto it = messages.rbegin(), end = messages.rend(); it != end; ++it) { - if((*it)->related_event_type != RelatedEventType::EDIT && (*it)->related_event_type != RelatedEventType::REDACTION && (*it)->timestamp > read_marker_message_timestamp) { + if((*it)->timestamp > read_marker_message_timestamp) { last_unread_message = (*it).get(); break; } @@ -400,13 +400,7 @@ namespace QuickMedia { room_tags_page->move_room_to_top(room); } else if(is_initial_sync) { Message *last_message = nullptr; - for(auto it = messages.rbegin(), end = messages.rend(); it != end; ++it) { - if((*it)->related_event_type != RelatedEventType::EDIT && (*it)->related_event_type != RelatedEventType::REDACTION) { - last_message = (*it).get(); - break; - } - } - if(last_message && !messages.empty()) + if(!messages.empty()) last_message = messages.back().get(); if(last_message) room_body_item->set_description(matrix->message_get_author_displayname(last_message) + ": " + extract_first_line_elipses(last_message->body, 150)); @@ -3104,6 +3098,7 @@ namespace QuickMedia { return nullptr; } + // Is this a synapse bug? sometimes lazy_fetch_members doesn't contain all related clients fprintf(stderr, "User was not available locally, fetched from server...\n"); return parse_user_info(json_root, user_id, room); } |