From 58301570c61670012457c1197d9b2007a000a24c Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 19 Apr 2023 10:38:55 +0300 Subject: [PATCH] Minor improvements. --- td/generate/scheme/td_api.tl | 4 ++-- td/telegram/BackgroundInfo.h | 2 ++ td/telegram/BackgroundManager.cpp | 1 + td/telegram/BackgroundManager.h | 1 + td/telegram/BotInfoManager.cpp | 3 +-- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 5043429bf..da515f1fe 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -518,7 +518,7 @@ background id:int64 is_default:Bool is_dark:Bool name:string document:document t //@description Contains a list of backgrounds @backgrounds A list of backgrounds backgrounds backgrounds:vector = Backgrounds; -//@description Describes a background set for a specific chat @background The background @dark_theme_dimming Dimmin of the background in dark themes, as a percentage; 0-100 +//@description Describes a background set for a specific chat @background The background @dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100 chatBackground background:background dark_theme_dimming:int32 = ChatBackground; @@ -7728,7 +7728,7 @@ setDefaultChannelAdministratorRights default_channel_administrator_rights:chatAd //@description Sets the name of a bot. Can be called only if userTypeBot.can_be_edited == true //@bot_user_id Identifier of the target bot //@language_code A two-letter ISO 639-1 language code. If empty, the description will be shown to all users, for which language there are no dedicated description -//@name New bot's name on the specified language; 0-64 characters. Default name can't be empty +//@name New bot's name on the specified language; 0-64 characters; must be non-empty if language code is empty setBotName bot_user_id:int53 language_code:string name:string = Ok; //@description Returns the name of a bot in the given language. Can be called only if userTypeBot.can_be_edited == true diff --git a/td/telegram/BackgroundInfo.h b/td/telegram/BackgroundInfo.h index 7338e3f7a..a070ce158 100644 --- a/td/telegram/BackgroundInfo.h +++ b/td/telegram/BackgroundInfo.h @@ -8,6 +8,8 @@ #include "td/telegram/BackgroundId.h" #include "td/telegram/BackgroundType.h" +#include "td/telegram/td_api.h" +#include "td/telegram/telegram_api.h" #include "td/utils/common.h" #include "td/utils/StringBuilder.h" diff --git a/td/telegram/BackgroundManager.cpp b/td/telegram/BackgroundManager.cpp index 4864158ad..bc8aaeffc 100644 --- a/td/telegram/BackgroundManager.cpp +++ b/td/telegram/BackgroundManager.cpp @@ -6,6 +6,7 @@ // #include "td/telegram/BackgroundManager.h" +#include "td/telegram/AccessRights.h" #include "td/telegram/AuthManager.h" #include "td/telegram/BackgroundType.hpp" #include "td/telegram/ContactsManager.h" diff --git a/td/telegram/BackgroundManager.h b/td/telegram/BackgroundManager.h index c50008d98..9741d6b05 100644 --- a/td/telegram/BackgroundManager.h +++ b/td/telegram/BackgroundManager.h @@ -12,6 +12,7 @@ #include "td/telegram/files/FileId.h" #include "td/telegram/files/FileSourceId.h" #include "td/telegram/logevent/LogEvent.h" +#include "td/telegram/MessageId.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" diff --git a/td/telegram/BotInfoManager.cpp b/td/telegram/BotInfoManager.cpp index 77b0f1b79..5eb17dd05 100644 --- a/td/telegram/BotInfoManager.cpp +++ b/td/telegram/BotInfoManager.cpp @@ -194,8 +194,7 @@ class GetBotInfoQuery final : public Td::ResultHandler { int32 flags = 0; auto r_input_user = get_bot_input_user(td_, bot_user_id); if (r_input_user.is_error()) { - on_error(r_input_user.move_as_error()); - return; + return on_error(r_input_user.move_as_error()); } if (r_input_user.ok() != nullptr) { flags |= telegram_api::bots_getBotInfo::BOT_MASK;