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)); }