From 66a40b2bc729f60de81d87a6d26e12d66fd5608c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 1 Aug 2021 03:49:54 +0200 Subject: Matrix: dont show room update if the last message is an edit --- src/QuickMedia.cpp | 2 +- src/plugins/Matrix.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index c44b8c4..a4dd182 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -4527,7 +4527,7 @@ namespace QuickMedia { if(message->related_event_type == RelatedEventType::REDACTION || message->related_event_type == RelatedEventType::EDIT || message->related_event_type == RelatedEventType::REACTION) body_item->visible = false; if(is_system_message_type(message->type)) { - body_item->set_author("System"); + body_item->set_author("Server"); body_item->set_author_color(get_current_theme().text_color); body_item->set_description_color(get_current_theme().faded_text_color); body_item->thumbnail_url.clear(); diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 383540d..0bb3e7b 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -543,11 +543,11 @@ namespace QuickMedia { size_t last_message_index = 0; for(size_t i = 1; i < messages.size(); ++i) { - if(message_is_timeline(messages[i].get()) && messages[i]->timestamp >= messages[last_message_index]->timestamp) + if(message_is_timeline(messages[i].get()) && messages[i]->related_event_type != RelatedEventType::EDIT && messages[i]->timestamp >= messages[last_message_index]->timestamp) last_message_index = i; } - if(message_is_timeline(messages[last_message_index].get())) + if(message_is_timeline(messages[last_message_index].get()) && messages[last_message_index]->related_event_type != RelatedEventType::EDIT) return messages[last_message_index]; return nullptr; -- cgit v1.2.3