From 32ed4704178cd8e0eb592d5e87521fec6299df6d Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 11 Apr 2022 12:55:43 +0300 Subject: [PATCH] Fix attach menu icons initialization. --- td/telegram/AttachMenuManager.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/td/telegram/AttachMenuManager.cpp b/td/telegram/AttachMenuManager.cpp index cdcf52495..fe34aa3c2 100644 --- a/td/telegram/AttachMenuManager.cpp +++ b/td/telegram/AttachMenuManager.cpp @@ -598,7 +598,7 @@ Result AttachMenuManager::get_attach_menu_bot( auto parsed_document = td_->documents_manager_->on_get_document(move_tl_object_as(icon->icon_), DialogId()); if (parsed_document.type != expected_document_type) { - LOG(ERROR) << "Receive wrong attach menu bot icon for " << user_id; + LOG(ERROR) << "Receive wrong attach menu bot icon \"" << name << "\" for " << user_id; continue; } bool expect_colors = false; @@ -653,14 +653,14 @@ Result AttachMenuManager::get_attach_menu_bot( default: UNREACHABLE(); } - if (attach_menu_bot.icon_color_.light_color_ == -1 || attach_menu_bot.icon_color_.dark_color_ == -1) { - LOG(ERROR) << "Receive wrong icon_color for " << user_id; - attach_menu_bot.icon_color_ = AttachMenuBotColor(); - } - if (attach_menu_bot.name_color_.light_color_ == -1 || attach_menu_bot.name_color_.dark_color_ == -1) { - LOG(ERROR) << "Receive wrong name_color for " << user_id; - attach_menu_bot.name_color_ = AttachMenuBotColor(); - } + } + if (attach_menu_bot.icon_color_.light_color_ == -1 || attach_menu_bot.icon_color_.dark_color_ == -1) { + LOG(ERROR) << "Receive wrong icon_color for " << user_id; + attach_menu_bot.icon_color_ = AttachMenuBotColor(); + } + if (attach_menu_bot.name_color_.light_color_ == -1 || attach_menu_bot.name_color_.dark_color_ == -1) { + LOG(ERROR) << "Receive wrong name_color for " << user_id; + attach_menu_bot.name_color_ = AttachMenuBotColor(); } } } else {