diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index b6e3467..86bd10d 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -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(chat_id, invite_link, name), + td::make_unique(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"); diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 0b0b3f6..3fef529 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -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);