aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-01 03:20:11 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-01 03:20:11 +0200
commit31069764704ebfc84588485b5213444e638e0206 (patch)
tree90bf7d5d35d1f6421c06e96600e97fa4cb69ddb8 /src
parentba24ce23e126706d0985510c44c42e2ff5a3e0b7 (diff)
Matrix: merge system messages
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp7
-rw-r--r--src/plugins/Matrix.cpp2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 286e766..c44b8c4 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -5422,13 +5422,18 @@ namespace QuickMedia {
tabs[MESSAGES_TAB_INDEX].body->body_item_merge_handler = [](BodyItem *prev_item, BodyItem *this_item) {
Message *message = static_cast<Message*>(this_item->userdata);
- if(!message || !prev_item || !prev_item->userdata || is_system_message_type(message->type))
+ if(!message || !prev_item || !prev_item->userdata)
return false;
if(is_visual_media_message_type(message->type) && !this_item->thumbnail_url.empty())
return false;
Message *prev_message = static_cast<Message*>(prev_item->userdata);
+ if(is_system_message_type(prev_message->type) && is_system_message_type(message->type))
+ return true;
+ else if(is_system_message_type(message->type))
+ return false;
+
if(is_visual_media_message_type(prev_message->type) && !prev_item->thumbnail_url.empty())
return false;
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 8cc98fa..383540d 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -2071,7 +2071,7 @@ namespace QuickMedia {
if(!result.empty())
result += '\n';
- result += changed_by_name + " changed the power level of " + change.first + " from " + power_level_to_name(change.second.old_power_level) + " to " + power_level_to_name(change.second.new_power_level);
+ result += changed_by_name + " changed the power level of " + change.first + " from " + power_level_to_name(change.second.old_power_level) + " to " + power_level_to_name(change.second.new_power_level) + ".";
}
return result;
}