From a7ef1062a5b91ab6b978056f6c95222f431700a6 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 12 May 2019 01:44:35 +0300 Subject: [PATCH] Do not add chats without notifications to notification settings exceptions. GitOrigin-RevId: 64006dfd576b4d1483ba22068bc20de409bc0c64 --- td/telegram/MessagesManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 4e44d6f3f..18582503a 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -13512,11 +13512,15 @@ vector MessagesManager::get_dialog_notification_settings_exceptions(No bool force, Promise &&promise) { if (last_dialog_date_ == MAX_DIALOG_DATE || force) { vector result; + auto my_dialog_id = get_my_dialog_id(); for (const auto &it : ordered_server_dialogs_) { auto dialog_id = it.get_dialog_id(); if (filter_scope && get_dialog_notification_setting_scope(dialog_id) != scope) { continue; } + if (dialog_id == my_dialog_id) { + continue; + } Dialog *d = get_dialog(dialog_id); CHECK(d != nullptr); @@ -13526,6 +13530,9 @@ vector MessagesManager::get_dialog_notification_settings_exceptions(No if (are_default_dialog_notification_settings(d->notification_settings, compare_sound)) { continue; } + if (is_dialog_message_notification_disabled(dialog_id, std::numeric_limits::max())) { + continue; + } result.push_back(dialog_id); } promise.set_value(Unit());