mirror of
https://github.com/tdlib/telegram-bot-api
synced 2025-08-22 01:49:24 +00:00
Add removeBusinessAccountProfilePhoto.
This commit is contained in:
parent
4e9331ada1
commit
1be9abdba4
@ -281,6 +281,7 @@ bool Client::init_methods() {
|
||||
methods_.emplace("setbusinessaccountusername", &Client::process_set_business_account_username_query);
|
||||
methods_.emplace("setbusinessaccountbio", &Client::process_set_business_account_bio_query);
|
||||
methods_.emplace("setbusinessaccountprofilephoto", &Client::process_set_business_account_profile_photo_query);
|
||||
methods_.emplace("removebusinessaccountprofilephoto", &Client::process_remove_business_account_profile_photo_query);
|
||||
methods_.emplace("setuseremojistatus", &Client::process_set_user_emoji_status_query);
|
||||
methods_.emplace("getchat", &Client::process_get_chat_query);
|
||||
methods_.emplace("setchatphoto", &Client::process_set_chat_photo_query);
|
||||
@ -12189,6 +12190,18 @@ td::Status Client::process_set_business_account_profile_photo_query(PromisedQuer
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_remove_business_account_profile_photo_query(PromisedQueryPtr &query) {
|
||||
auto business_connection_id = query->arg("business_connection_id").str();
|
||||
auto is_public = to_bool(query->arg("is_public"));
|
||||
check_business_connection(
|
||||
business_connection_id, std::move(query),
|
||||
[this, is_public](const BusinessConnection *business_connection, PromisedQueryPtr query) mutable {
|
||||
send_request(make_object<td_api::setBusinessAccountProfilePhoto>(business_connection->id_, nullptr, is_public),
|
||||
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
||||
});
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_set_user_emoji_status_query(PromisedQueryPtr &query) {
|
||||
TRY_RESULT(user_id, get_user_id(query.get()));
|
||||
auto emoji_status_custom_emoji_id = td::to_integer<int64>(query->arg("emoji_status_custom_emoji_id"));
|
||||
|
@ -730,6 +730,7 @@ class Client final : public WebhookActor::Callback {
|
||||
td::Status process_set_business_account_username_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_business_account_bio_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_business_account_profile_photo_query(PromisedQueryPtr &query);
|
||||
td::Status process_remove_business_account_profile_photo_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_user_emoji_status_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_chat_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_chat_photo_query(PromisedQueryPtr &query);
|
||||
|
Loading…
x
Reference in New Issue
Block a user