From 77b34797d89d23ccfab3f3e1eab532f0bc73ab38 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Sun, 28 Apr 2024 11:51:44 +0200 Subject: [PATCH] Improve error message for empty start_parameter. --- td/telegram/InlineQueriesManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/td/telegram/InlineQueriesManager.cpp b/td/telegram/InlineQueriesManager.cpp index 1c6a5b628..abf919e2c 100644 --- a/td/telegram/InlineQueriesManager.cpp +++ b/td/telegram/InlineQueriesManager.cpp @@ -535,13 +535,13 @@ void InlineQueriesManager::answer_inline_query( case td_api::inlineQueryResultsButtonTypeStartBot::ID: { auto type = td_api::move_object_as(button->type_); if (type->parameter_.empty()) { - return promise.set_error(Status::Error(400, "Can't use empty switch_pm_parameter")); + return promise.set_error(Status::Error(400, "Can't use empty start_parameter")); } if (type->parameter_.size() > 64) { - return promise.set_error(Status::Error(400, "Too long switch_pm_parameter specified")); + return promise.set_error(Status::Error(400, "Too long start_parameter specified")); } if (!is_base64url_characters(type->parameter_)) { - return promise.set_error(Status::Error(400, "Unallowed characters in switch_pm_parameter are used")); + return promise.set_error(Status::Error(400, "Unallowed characters in start_parameter are used")); } switch_pm = telegram_api::make_object(button->text_, type->parameter_); break;