mirror of
https://github.com/PaiGramTeam/telegram-bot-api.git
synced 2024-11-22 06:57:51 +00:00
Add method editChatSubscriptionInviteLink.
This commit is contained in:
parent
76e5ed31c0
commit
961a19e1a0
@ -260,6 +260,7 @@ bool Client::init_methods() {
|
||||
methods_.emplace("createchatinvitelink", &Client::process_create_chat_invite_link_query);
|
||||
methods_.emplace("createchatsubscriptioninvitelink", &Client::process_create_chat_subscription_invite_link_query);
|
||||
methods_.emplace("editchatinvitelink", &Client::process_edit_chat_invite_link_query);
|
||||
methods_.emplace("editchatsubscriptioninvitelink", &Client::process_edit_chat_subscription_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);
|
||||
@ -11236,6 +11237,19 @@ td::Status Client::process_edit_chat_invite_link_query(PromisedQueryPtr &query)
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_edit_chat_subscription_invite_link_query(PromisedQueryPtr &query) {
|
||||
auto chat_id = query->arg("chat_id");
|
||||
auto invite_link = query->arg("invite_link");
|
||||
auto name = query->arg("name");
|
||||
|
||||
check_chat(chat_id, AccessRights::Write, std::move(query),
|
||||
[this, invite_link = invite_link.str(), name = name.str()](int64 chat_id, PromisedQueryPtr query) {
|
||||
send_request(make_object<td_api::editChatSubscriptionInviteLink>(chat_id, invite_link, name),
|
||||
td::make_unique<TdOnGetChatInviteLinkCallback>(this, std::move(query)));
|
||||
});
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_revoke_chat_invite_link_query(PromisedQueryPtr &query) {
|
||||
auto chat_id = query->arg("chat_id");
|
||||
auto invite_link = query->arg("invite_link");
|
||||
|
@ -685,6 +685,7 @@ class Client final : public WebhookActor::Callback {
|
||||
td::Status process_create_chat_invite_link_query(PromisedQueryPtr &query);
|
||||
td::Status process_create_chat_subscription_invite_link_query(PromisedQueryPtr &query);
|
||||
td::Status process_edit_chat_invite_link_query(PromisedQueryPtr &query);
|
||||
td::Status process_edit_chat_subscription_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);
|
||||
|
Loading…
Reference in New Issue
Block a user