From fd7c17ae43462b134fdcda71eb0e2a8baabaca14 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 25 Mar 2019 19:41:47 +0300 Subject: [PATCH] Always send updateActiveNotifications. GitOrigin-RevId: e5dfab0f5b75132fb85177938807d137284c7dce --- td/telegram/NotificationManager.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index 123fca7f..89eb0c98 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -225,10 +225,8 @@ void NotificationManager::init() { } while (loaded_groups < needed_groups && last_loaded_notification_group_key_.last_notification_date != 0); auto update = get_update_active_notifications(); - if (update != nullptr) { - VLOG(notifications) << "Send " << as_active_notifications_update(update.get()); - send_closure(G()->td(), &Td::send_update, std::move(update)); - } + VLOG(notifications) << "Send " << as_active_notifications_update(update.get()); + send_closure(G()->td(), &Td::send_update, std::move(update)); } auto call_notification_group_ids_string = G()->td_db()->get_binlog_pmc()->get("notification_call_group_ids"); @@ -287,9 +285,6 @@ td_api::object_ptr NotificationManager::get_u group.first.dialog_id.get(), group.second.total_count, std::move(notifications))); } } - if (groups.empty()) { - return nullptr; - } return td_api::make_object(std::move(groups)); } @@ -2600,10 +2595,7 @@ void NotificationManager::get_current_state(vector(true)); }