diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 63c748e2..a372a7fa 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -21575,8 +21575,10 @@ void MessagesManager::delete_message_from_database(Dialog *d, MessageId message_ // last notification is deleted, need to find new last notification fix_dialog_last_notification_id(d, from_mentions, m->message_id); } - send_closure_later(G()->notification_manager(), &NotificationManager::remove_notification, group_info.group_id, - m->notification_id, true, Promise()); + if (is_message_notification_active(d, m)) { + send_closure_later(G()->notification_manager(), &NotificationManager::remove_notification, group_info.group_id, + m->notification_id, true, Promise()); + } } }