From 568197a727924faaddcccee742efc6143aac00a4 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 10 Feb 2023 20:32:11 +0100 Subject: Matrix: fix notification not shown when matrix open and receiving a new reply --- src/plugins/Matrix.cpp | 9 ++++----- 1 file 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")); } } -- cgit v1.2.3