mirror of
https://github.com/tdlib/telegram-bot-api
synced 2025-08-29 13:28:01 +00:00
Add getBusinessConnection method.
This commit is contained in:
parent
15836d84f4
commit
5ca4a446f0
@ -257,6 +257,7 @@ bool Client::init_methods() {
|
|||||||
methods_.emplace("createchatinvitelink", &Client::process_create_chat_invite_link_query);
|
methods_.emplace("createchatinvitelink", &Client::process_create_chat_invite_link_query);
|
||||||
methods_.emplace("editchatinvitelink", &Client::process_edit_chat_invite_link_query);
|
methods_.emplace("editchatinvitelink", &Client::process_edit_chat_invite_link_query);
|
||||||
methods_.emplace("revokechatinvitelink", &Client::process_revoke_chat_invite_link_query);
|
methods_.emplace("revokechatinvitelink", &Client::process_revoke_chat_invite_link_query);
|
||||||
|
methods_.emplace("getbusinessconnection", &Client::process_get_business_connection_query);
|
||||||
methods_.emplace("getchat", &Client::process_get_chat_query);
|
methods_.emplace("getchat", &Client::process_get_chat_query);
|
||||||
methods_.emplace("setchatphoto", &Client::process_set_chat_photo_query);
|
methods_.emplace("setchatphoto", &Client::process_set_chat_photo_query);
|
||||||
methods_.emplace("deletechatphoto", &Client::process_delete_chat_photo_query);
|
methods_.emplace("deletechatphoto", &Client::process_delete_chat_photo_query);
|
||||||
@ -10331,6 +10332,17 @@ td::Status Client::process_revoke_chat_invite_link_query(PromisedQueryPtr &query
|
|||||||
return td::Status::OK();
|
return td::Status::OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td::Status Client::process_get_business_connection_query(PromisedQueryPtr &query) {
|
||||||
|
auto business_connection_id = query->arg("business_connection_id");
|
||||||
|
check_business_connection(business_connection_id.str(), std::move(query),
|
||||||
|
[this](const td::string &business_connection_id, PromisedQueryPtr query) mutable {
|
||||||
|
const auto *connection = get_business_connection(business_connection_id);
|
||||||
|
CHECK(connection != nullptr);
|
||||||
|
answer_query(JsonBusinessConnection(connection, this), std::move(query));
|
||||||
|
});
|
||||||
|
return td::Status::OK();
|
||||||
|
}
|
||||||
|
|
||||||
td::Status Client::process_get_chat_query(PromisedQueryPtr &query) {
|
td::Status Client::process_get_chat_query(PromisedQueryPtr &query) {
|
||||||
auto chat_id = query->arg("chat_id");
|
auto chat_id = query->arg("chat_id");
|
||||||
|
|
||||||
|
@ -650,6 +650,7 @@ class Client final : public WebhookActor::Callback {
|
|||||||
td::Status process_create_chat_invite_link_query(PromisedQueryPtr &query);
|
td::Status process_create_chat_invite_link_query(PromisedQueryPtr &query);
|
||||||
td::Status process_edit_chat_invite_link_query(PromisedQueryPtr &query);
|
td::Status process_edit_chat_invite_link_query(PromisedQueryPtr &query);
|
||||||
td::Status process_revoke_chat_invite_link_query(PromisedQueryPtr &query);
|
td::Status process_revoke_chat_invite_link_query(PromisedQueryPtr &query);
|
||||||
|
td::Status process_get_business_connection_query(PromisedQueryPtr &query);
|
||||||
td::Status process_get_chat_query(PromisedQueryPtr &query);
|
td::Status process_get_chat_query(PromisedQueryPtr &query);
|
||||||
td::Status process_set_chat_photo_query(PromisedQueryPtr &query);
|
td::Status process_set_chat_photo_query(PromisedQueryPtr &query);
|
||||||
td::Status process_delete_chat_photo_query(PromisedQueryPtr &query);
|
td::Status process_delete_chat_photo_query(PromisedQueryPtr &query);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user