aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-01 03:49:54 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-01 03:49:54 +0200
commit66a40b2bc729f60de81d87a6d26e12d66fd5608c (patch)
treefee8a4e5ab0f9bd19dc42e8f3362a031bd76c7b4
parent31069764704ebfc84588485b5213444e638e0206 (diff)
Matrix: dont show room update if the last message is an edit
-rw-r--r--src/QuickMedia.cpp2
-rw-r--r--src/plugins/Matrix.cpp4
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;