diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index c1acb5e..8a9c14f 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -7617,7 +7617,9 @@ class Client::TdOnGetStickerSetNameCallback final : public TdQueryCallback { return promise_.set_error(td::Status::Error(error->code_, error->message_)); } - client_->on_get_sticker_set_name(sticker_set_id_, std::move(result)); + CHECK(result->get_id() == td_api::text::ID); + auto text = move_object_as(result); + client_->on_get_sticker_set_name(sticker_set_id_, text->text_); promise_.set_value(td::Unit()); } @@ -7999,12 +8001,6 @@ void Client::on_get_sticker_set_name(int64 set_id, const td::string &name) { } } -void Client::on_get_sticker_set_name(int64 set_id, object_ptr sticker_set_name) { - CHECK(sticker_set_name->get_id() == td_api::text::ID); - auto text = move_object_as(sticker_set_name); - on_get_sticker_set_name(set_id, text->text_); -} - template void Client::check_user_read_access(const UserInfo *user_info, PromisedQueryPtr query, OnSuccess on_success) { CHECK(user_info != nullptr); diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 0db7d0b..294b840 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -327,8 +327,6 @@ class Client final : public WebhookActor::Callback { void on_get_sticker_set_name(int64 set_id, const td::string &name); - void on_get_sticker_set_name(int64 set_id, object_ptr sticker_set_name); - class TdQueryCallback { public: virtual void on_result(object_ptr result) = 0;