aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-02-10 20:32:11 +0100
committerdec05eba <dec05eba@protonmail.com>2023-02-10 20:32:11 +0100
commit568197a727924faaddcccee742efc6143aac00a4 (patch)
treee921b2523363b386907ab8f7f729570b1008b3c3
parent24fb11d22f29f6d4797cc27daebe23dfc8ecb2de (diff)
Matrix: fix notification not shown when matrix open and receiving a new reply
-rw-r--r--src/plugins/Matrix.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 269e9bb..04062f3 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -2725,11 +2725,10 @@ namespace QuickMedia {
// TODO: Is @room ok? shouldn't we also check if the user has permission to do @room? (only when notifications are limited to @mentions)
// TODO: Is comparing against read marker timestamp ok enough?
if(message_is_timeline(message.get()) && me && message->timestamp > read_marker_message_timestamp && may_have_unread_notifications) {
- std::string message_str = message_to_qm_text(this, message.get(), false);
- message->notification_mentions_me = message_contains_user_mention(message_str, my_display_name)
- || message_contains_user_mention(message_str, me->user_id)
- || (has_unread_notifications && message_contains_user_mention(message_str, "@room")); // TODO: ...
- //|| (power_level_is_at_least_admin(message->user->power_level, room_data) && message_contains_user_mention(message_str, "@room"));
+ message->notification_mentions_me = message_contains_user_mention(message->body, my_display_name)
+ || message_contains_user_mention(message->body, me->user_id)
+ || (has_unread_notifications && message_contains_user_mention(message->body, "@room")); // TODO: ...
+ //|| (power_level_is_at_least_admin(message->user->power_level, room_data) && message_contains_user_mention(message->body, "@room"));
}
}