Rename administrator_user_id to creator_user_id.

This commit is contained in:
levlam 2021-02-25 16:02:07 +03:00
parent c733f8ed34
commit 18fc612b3b
8 changed files with 47 additions and 49 deletions

View File

@ -547,7 +547,7 @@ supergroupMembersFilterMention query:string message_thread_id:int53 = Supergroup
supergroupMembersFilterBots = SupergroupMembersFilter; supergroupMembersFilterBots = SupergroupMembersFilter;
//@description Contains a chat invite link @invite_link Chat invite link @administrator_user_id User identifier of an administrator created the link //@description Contains a chat invite link @invite_link Chat invite link @creator_user_id User identifier of an administrator created the link
//@date Point in time (Unix timestamp) when the link was created //@date Point in time (Unix timestamp) when the link was created
//@edit_date Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown //@edit_date Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown
//@expire_date Point in time (Unix timestamp) when the link will expire; 0 if never //@expire_date Point in time (Unix timestamp) when the link will expire; 0 if never
@ -555,7 +555,7 @@ supergroupMembersFilterBots = SupergroupMembersFilter;
//@member_count Number of chat members, which joined the chat using the link //@member_count Number of chat members, which joined the chat using the link
//@is_primary True, if the link is primary. Primary invite link can't have expire date or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time //@is_primary True, if the link is primary. Primary invite link can't have expire date or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time
//@is_revoked True, if the link was revoked //@is_revoked True, if the link was revoked
chatInviteLink invite_link:string administrator_user_id:int32 date:int32 edit_date:int32 expire_date:int32 member_limit:int32 member_count:int32 is_primary:Bool is_revoked:Bool = ChatInviteLink; chatInviteLink invite_link:string creator_user_id:int32 date:int32 edit_date:int32 expire_date:int32 member_limit:int32 member_count:int32 is_primary:Bool is_revoked:Bool = ChatInviteLink;
//@description Contains a list of chat invite links @total_count Approximate total count of chat invite links found @invite_links List of invite links //@description Contains a list of chat invite links @total_count Approximate total count of chat invite links found @invite_links List of invite links
chatInviteLinks total_count:int32 invite_links:vector<chatInviteLink> = ChatInviteLinks; chatInviteLinks total_count:int32 invite_links:vector<chatInviteLink> = ChatInviteLinks;
@ -4492,12 +4492,12 @@ getChatInviteLinkCounts chat_id:int53 = ChatInviteLinkCounts;
//@description Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links //@description Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links
//@chat_id Chat identifier //@chat_id Chat identifier
//@administrator_user_id User identifier of a chat administrator. Must be an identifier of the current user for non-owner //@creator_user_id User identifier of a chat administrator. Must be an identifier of the current user for non-owner
//@is_revoked Pass true if revoked links needs to be returned instead of active or expired //@is_revoked Pass true if revoked links needs to be returned instead of active or expired
//@offset_date Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning //@offset_date Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning
//@offset_invite_link Invite link starting after which to return invite links; use empty string to get results from the beginning //@offset_invite_link Invite link starting after which to return invite links; use empty string to get results from the beginning
//@limit Maximum number of invite links to return //@limit Maximum number of invite links to return
getChatInviteLinks chat_id:int53 administrator_user_id:int32 is_revoked:Bool offset_date:int32 offset_invite_link:string limit:int32 = ChatInviteLinks; getChatInviteLinks chat_id:int53 creator_user_id:int32 is_revoked:Bool offset_date:int32 offset_invite_link:string limit:int32 = ChatInviteLinks;
//@description Returns chat members joined a chat by an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier @invite_link Invite link for which to return chat members //@description Returns chat members joined a chat by an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier @invite_link Invite link for which to return chat members
//@offset_member A chat member from which to return next chat members; use null to get results from the beginning @limit Maximum number of chat members to return //@offset_member A chat member from which to return next chat members; use null to get results from the beginning @limit Maximum number of chat members to return
@ -4514,8 +4514,8 @@ deleteRevokedChatInviteLink chat_id:int53 invite_link:string = Ok;
//@description Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links //@description Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
//@chat_id Chat identifier //@chat_id Chat identifier
//@administrator_user_id User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner //@creator_user_id User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner
deleteAllRevokedChatInviteLinks chat_id:int53 administrator_user_id:int32 = Ok; deleteAllRevokedChatInviteLinks chat_id:int53 creator_user_id:int32 = Ok;
//@description Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link Invite link to be checked; must have URL "t.me", "telegram.me", or "telegram.dog" and query beginning with "/joinchat/" or "/+" //@description Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link Invite link to be checked; must have URL "t.me", "telegram.me", or "telegram.dog" and query beginning with "/joinchat/" or "/+"
checkChatInviteLink invite_link:string = ChatInviteLinkInfo; checkChatInviteLink invite_link:string = ChatInviteLinkInfo;

Binary file not shown.

View File

@ -1684,7 +1684,7 @@ class ExportChatInviteQuery : public Td::ResultHandler {
if (!invite_link.is_valid()) { if (!invite_link.is_valid()) {
return on_error(id, Status::Error(500, "Receive invalid invite link")); return on_error(id, Status::Error(500, "Receive invalid invite link"));
} }
if (invite_link.get_administrator_user_id() != td->contacts_manager_->get_my_id()) { if (invite_link.get_creator_user_id() != td->contacts_manager_->get_my_id()) {
return on_error(id, Status::Error(500, "Receive invalid invite link creator")); return on_error(id, Status::Error(500, "Receive invalid invite link creator"));
} }
if (invite_link.is_permanent()) { if (invite_link.is_permanent()) {
@ -1810,7 +1810,7 @@ class GetExportedChatInvitesQuery : public Td::ResultHandler {
: promise_(std::move(promise)) { : promise_(std::move(promise)) {
} }
void send(DialogId dialog_id, UserId administrator_user_id, bool is_revoked, int32 offset_date, void send(DialogId dialog_id, UserId creator_user_id, bool is_revoked, int32 offset_date,
const string &offset_invite_link, int32 limit) { const string &offset_invite_link, int32 limit) {
dialog_id_ = dialog_id; dialog_id_ = dialog_id;
auto input_peer = td->messages_manager_->get_input_peer(dialog_id, AccessRights::Write); auto input_peer = td->messages_manager_->get_input_peer(dialog_id, AccessRights::Write);
@ -1818,7 +1818,7 @@ class GetExportedChatInvitesQuery : public Td::ResultHandler {
return on_error(0, Status::Error(400, "Can't access the chat")); return on_error(0, Status::Error(400, "Can't access the chat"));
} }
auto input_user = td->contacts_manager_->get_input_user(administrator_user_id); auto input_user = td->contacts_manager_->get_input_user(creator_user_id);
CHECK(input_user != nullptr); CHECK(input_user != nullptr);
int32 flags = 0; int32 flags = 0;
@ -2034,7 +2034,7 @@ class RevokeChatInviteLinkQuery : public Td::ResultHandler {
if (!invite_link.is_valid() || !new_invite_link.is_valid()) { if (!invite_link.is_valid() || !new_invite_link.is_valid()) {
return on_error(id, Status::Error(500, "Receive invalid invite link")); return on_error(id, Status::Error(500, "Receive invalid invite link"));
} }
if (new_invite_link.get_administrator_user_id() == td->contacts_manager_->get_my_id() && if (new_invite_link.get_creator_user_id() == td->contacts_manager_->get_my_id() &&
new_invite_link.is_permanent()) { new_invite_link.is_permanent()) {
td->contacts_manager_->on_get_permanent_dialog_invite_link(dialog_id_, new_invite_link); td->contacts_manager_->on_get_permanent_dialog_invite_link(dialog_id_, new_invite_link);
} }
@ -2097,14 +2097,14 @@ class DeleteRevokedExportedChatInvitesQuery : public Td::ResultHandler {
explicit DeleteRevokedExportedChatInvitesQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) { explicit DeleteRevokedExportedChatInvitesQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) {
} }
void send(DialogId dialog_id, UserId administrator_user_id) { void send(DialogId dialog_id, UserId creator_user_id) {
dialog_id_ = dialog_id; dialog_id_ = dialog_id;
auto input_peer = td->messages_manager_->get_input_peer(dialog_id, AccessRights::Write); auto input_peer = td->messages_manager_->get_input_peer(dialog_id, AccessRights::Write);
if (input_peer == nullptr) { if (input_peer == nullptr) {
return on_error(0, Status::Error(400, "Can't access the chat")); return on_error(0, Status::Error(400, "Can't access the chat"));
} }
auto input_user = td->contacts_manager_->get_input_user(administrator_user_id); auto input_user = td->contacts_manager_->get_input_user(creator_user_id);
CHECK(input_user != nullptr); CHECK(input_user != nullptr);
send_query(G()->net_query_creator().create( send_query(G()->net_query_creator().create(
@ -7179,12 +7179,12 @@ void ContactsManager::get_dialog_invite_link_counts(
td_->create_handler<GetChatAdminWithInvitesQuery>(std::move(promise))->send(dialog_id); td_->create_handler<GetChatAdminWithInvitesQuery>(std::move(promise))->send(dialog_id);
} }
void ContactsManager::get_dialog_invite_links(DialogId dialog_id, UserId administrator_user_id, bool is_revoked, void ContactsManager::get_dialog_invite_links(DialogId dialog_id, UserId creator_user_id, bool is_revoked,
int32 offset_date, const string &offset_invite_link, int32 limit, int32 offset_date, const string &offset_invite_link, int32 limit,
Promise<td_api::object_ptr<td_api::chatInviteLinks>> &&promise) { Promise<td_api::object_ptr<td_api::chatInviteLinks>> &&promise) {
TRY_STATUS_PROMISE(promise, can_manage_dialog_invite_links(dialog_id, administrator_user_id != get_my_id())); TRY_STATUS_PROMISE(promise, can_manage_dialog_invite_links(dialog_id, creator_user_id != get_my_id()));
if (!have_input_user(administrator_user_id)) { if (!have_input_user(creator_user_id)) {
return promise.set_error(Status::Error(400, "Administrator user not found")); return promise.set_error(Status::Error(400, "Administrator user not found"));
} }
@ -7193,7 +7193,7 @@ void ContactsManager::get_dialog_invite_links(DialogId dialog_id, UserId adminis
} }
td_->create_handler<GetExportedChatInvitesQuery>(std::move(promise)) td_->create_handler<GetExportedChatInvitesQuery>(std::move(promise))
->send(dialog_id, administrator_user_id, is_revoked, offset_date, offset_invite_link, limit); ->send(dialog_id, creator_user_id, is_revoked, offset_date, offset_invite_link, limit);
} }
void ContactsManager::get_dialog_invite_link_users( void ContactsManager::get_dialog_invite_link_users(
@ -7230,16 +7230,15 @@ void ContactsManager::delete_revoked_dialog_invite_link(DialogId dialog_id, cons
td_->create_handler<DeleteExportedChatInviteQuery>(std::move(promise))->send(dialog_id, invite_link); td_->create_handler<DeleteExportedChatInviteQuery>(std::move(promise))->send(dialog_id, invite_link);
} }
void ContactsManager::delete_all_revoked_dialog_invite_links(DialogId dialog_id, UserId administrator_user_id, void ContactsManager::delete_all_revoked_dialog_invite_links(DialogId dialog_id, UserId creator_user_id,
Promise<Unit> &&promise) { Promise<Unit> &&promise) {
TRY_STATUS_PROMISE(promise, can_manage_dialog_invite_links(dialog_id, administrator_user_id != get_my_id())); TRY_STATUS_PROMISE(promise, can_manage_dialog_invite_links(dialog_id, creator_user_id != get_my_id()));
if (!have_input_user(administrator_user_id)) { if (!have_input_user(creator_user_id)) {
return promise.set_error(Status::Error(400, "Administrator user not found")); return promise.set_error(Status::Error(400, "Administrator user not found"));
} }
td_->create_handler<DeleteRevokedExportedChatInvitesQuery>(std::move(promise)) td_->create_handler<DeleteRevokedExportedChatInvitesQuery>(std::move(promise))->send(dialog_id, creator_user_id);
->send(dialog_id, administrator_user_id);
} }
void ContactsManager::check_dialog_invite_link(const string &invite_link, Promise<Unit> &&promise) const { void ContactsManager::check_dialog_invite_link(const string &invite_link, Promise<Unit> &&promise) const {
@ -9363,7 +9362,7 @@ void ContactsManager::on_load_chat_full_from_database(ChatId chat_id, string val
dependencies.user_ids.insert(participant.user_id); dependencies.user_ids.insert(participant.user_id);
dependencies.user_ids.insert(participant.inviter_user_id); dependencies.user_ids.insert(participant.inviter_user_id);
} }
dependencies.user_ids.insert(chat_full->invite_link.get_administrator_user_id()); dependencies.user_ids.insert(chat_full->invite_link.get_creator_user_id());
resolve_dependencies_force(td_, dependencies, "chat_full"); resolve_dependencies_force(td_, dependencies, "chat_full");
for (auto &participant : chat_full->participants) { for (auto &participant : chat_full->participants) {
@ -9459,7 +9458,7 @@ void ContactsManager::on_load_channel_full_from_database(ChannelId channel_id, s
add_dialog_and_dependencies(dependencies, DialogId(channel_full->linked_channel_id)); add_dialog_and_dependencies(dependencies, DialogId(channel_full->linked_channel_id));
dependencies.chat_ids.insert(channel_full->migrated_from_chat_id); dependencies.chat_ids.insert(channel_full->migrated_from_chat_id);
dependencies.user_ids.insert(channel_full->bot_user_ids.begin(), channel_full->bot_user_ids.end()); dependencies.user_ids.insert(channel_full->bot_user_ids.begin(), channel_full->bot_user_ids.end());
dependencies.user_ids.insert(channel_full->invite_link.get_administrator_user_id()); dependencies.user_ids.insert(channel_full->invite_link.get_creator_user_id());
resolve_dependencies_force(td_, dependencies, "channel_full"); resolve_dependencies_force(td_, dependencies, "channel_full");
for (auto &user_id : channel_full->bot_user_ids) { for (auto &user_id : channel_full->bot_user_ids) {

View File

@ -404,7 +404,7 @@ class ContactsManager : public Actor {
void get_dialog_invite_link_counts(DialogId dialog_id, void get_dialog_invite_link_counts(DialogId dialog_id,
Promise<td_api::object_ptr<td_api::chatInviteLinkCounts>> &&promise); Promise<td_api::object_ptr<td_api::chatInviteLinkCounts>> &&promise);
void get_dialog_invite_links(DialogId dialog_id, UserId administrator_user_id, bool is_revoked, int32 offset_date, void get_dialog_invite_links(DialogId dialog_id, UserId creator_user_id, bool is_revoked, int32 offset_date,
const string &offset_invite_link, int32 limit, const string &offset_invite_link, int32 limit,
Promise<td_api::object_ptr<td_api::chatInviteLinks>> &&promise); Promise<td_api::object_ptr<td_api::chatInviteLinks>> &&promise);
@ -417,8 +417,7 @@ class ContactsManager : public Actor {
void delete_revoked_dialog_invite_link(DialogId dialog_id, const string &invite_link, Promise<Unit> &&promise); void delete_revoked_dialog_invite_link(DialogId dialog_id, const string &invite_link, Promise<Unit> &&promise);
void delete_all_revoked_dialog_invite_links(DialogId dialog_id, UserId administrator_user_id, void delete_all_revoked_dialog_invite_links(DialogId dialog_id, UserId creator_user_id, Promise<Unit> &&promise);
Promise<Unit> &&promise);
void check_dialog_invite_link(const string &invite_link, Promise<Unit> &&promise) const; void check_dialog_invite_link(const string &invite_link, Promise<Unit> &&promise) const;

View File

@ -26,10 +26,10 @@ DialogInviteLink::DialogInviteLink(tl_object_ptr<telegram_api::chatInviteExporte
invite_link_ = std::move(exported_invite->link_); invite_link_ = std::move(exported_invite->link_);
LOG_IF(ERROR, !is_valid_invite_link(invite_link_)) << "Unsupported invite link " << invite_link_; LOG_IF(ERROR, !is_valid_invite_link(invite_link_)) << "Unsupported invite link " << invite_link_;
administrator_user_id_ = UserId(exported_invite->admin_id_); creator_user_id_ = UserId(exported_invite->admin_id_);
if (!administrator_user_id_.is_valid()) { if (!creator_user_id_.is_valid()) {
LOG(ERROR) << "Receive invalid " << administrator_user_id_ << " as creator of a link " << invite_link_; LOG(ERROR) << "Receive invalid " << creator_user_id_ << " as creator of a link " << invite_link_;
administrator_user_id_ = UserId(); creator_user_id_ = UserId();
} }
date_ = exported_invite->date_; date_ = exported_invite->date_;
if (date_ < 1000000000) { if (date_ < 1000000000) {
@ -109,12 +109,12 @@ td_api::object_ptr<td_api::chatInviteLink> DialogInviteLink::get_chat_invite_lin
} }
return td_api::make_object<td_api::chatInviteLink>( return td_api::make_object<td_api::chatInviteLink>(
invite_link_, contacts_manager->get_user_id_object(administrator_user_id_, "get_chat_invite_link_object"), date_, invite_link_, contacts_manager->get_user_id_object(creator_user_id_, "get_chat_invite_link_object"), date_,
edit_date_, expire_date_, usage_limit_, usage_count_, is_permanent_, is_revoked_); edit_date_, expire_date_, usage_limit_, usage_count_, is_permanent_, is_revoked_);
} }
bool operator==(const DialogInviteLink &lhs, const DialogInviteLink &rhs) { bool operator==(const DialogInviteLink &lhs, const DialogInviteLink &rhs) {
return lhs.invite_link_ == rhs.invite_link_ && lhs.administrator_user_id_ == rhs.administrator_user_id_ && return lhs.invite_link_ == rhs.invite_link_ && lhs.creator_user_id_ == rhs.creator_user_id_ &&
lhs.date_ == rhs.date_ && lhs.edit_date_ == rhs.edit_date_ && lhs.expire_date_ == rhs.expire_date_ && lhs.date_ == rhs.date_ && lhs.edit_date_ == rhs.edit_date_ && lhs.expire_date_ == rhs.expire_date_ &&
lhs.usage_limit_ == rhs.usage_limit_ && lhs.usage_count_ == rhs.usage_count_ && lhs.usage_limit_ == rhs.usage_limit_ && lhs.usage_count_ == rhs.usage_count_ &&
lhs.is_permanent_ == rhs.is_permanent_ && lhs.is_revoked_ == rhs.is_revoked_; lhs.is_permanent_ == rhs.is_permanent_ && lhs.is_revoked_ == rhs.is_revoked_;
@ -125,7 +125,7 @@ bool operator!=(const DialogInviteLink &lhs, const DialogInviteLink &rhs) {
} }
StringBuilder &operator<<(StringBuilder &string_builder, const DialogInviteLink &invite_link) { StringBuilder &operator<<(StringBuilder &string_builder, const DialogInviteLink &invite_link) {
return string_builder << "ChatInviteLink[" << invite_link.invite_link_ << " by " << invite_link.administrator_user_id_ return string_builder << "ChatInviteLink[" << invite_link.invite_link_ << " by " << invite_link.creator_user_id_
<< " created at " << invite_link.date_ << " edited at " << invite_link.edit_date_ << " created at " << invite_link.date_ << " edited at " << invite_link.edit_date_
<< " expiring at " << invite_link.expire_date_ << " used by " << invite_link.usage_count_ << " expiring at " << invite_link.expire_date_ << " used by " << invite_link.usage_count_
<< " with usage limit " << invite_link.usage_limit_ << "]"; << " with usage limit " << invite_link.usage_limit_ << "]";

View File

@ -21,7 +21,7 @@ class ContactsManager;
class DialogInviteLink { class DialogInviteLink {
string invite_link_; string invite_link_;
UserId administrator_user_id_; UserId creator_user_id_;
int32 date_ = 0; int32 date_ = 0;
int32 edit_date_ = 0; int32 edit_date_ = 0;
int32 expire_date_ = 0; int32 expire_date_ = 0;
@ -48,7 +48,7 @@ class DialogInviteLink {
td_api::object_ptr<td_api::chatInviteLink> get_chat_invite_link_object(const ContactsManager *contacts_manager) const; td_api::object_ptr<td_api::chatInviteLink> get_chat_invite_link_object(const ContactsManager *contacts_manager) const;
bool is_valid() const { bool is_valid() const {
return !invite_link_.empty() && administrator_user_id_.is_valid() && date_ > 0; return !invite_link_.empty() && creator_user_id_.is_valid() && date_ > 0;
} }
bool is_permanent() const { bool is_permanent() const {
@ -59,8 +59,8 @@ class DialogInviteLink {
return invite_link_; return invite_link_;
} }
UserId get_administrator_user_id() const { UserId get_creator_user_id() const {
return administrator_user_id_; return creator_user_id_;
} }
template <class StorerT> template <class StorerT>
@ -79,7 +79,7 @@ class DialogInviteLink {
STORE_FLAG(has_edit_date); STORE_FLAG(has_edit_date);
END_STORE_FLAGS(); END_STORE_FLAGS();
store(invite_link_, storer); store(invite_link_, storer);
store(administrator_user_id_, storer); store(creator_user_id_, storer);
store(date_, storer); store(date_, storer);
if (has_expire_date) { if (has_expire_date) {
store(expire_date_, storer); store(expire_date_, storer);
@ -111,7 +111,7 @@ class DialogInviteLink {
PARSE_FLAG(has_edit_date); PARSE_FLAG(has_edit_date);
END_PARSE_FLAGS(); END_PARSE_FLAGS();
parse(invite_link_, parser); parse(invite_link_, parser);
parse(administrator_user_id_, parser); parse(creator_user_id_, parser);
parse(date_, parser); parse(date_, parser);
if (has_expire_date) { if (has_expire_date) {
parse(expire_date_, parser); parse(expire_date_, parser);

View File

@ -6348,7 +6348,7 @@ void Td::on_request(uint64 id, td_api::getChatInviteLinks &request) {
CHECK_IS_USER(); CHECK_IS_USER();
CLEAN_INPUT_STRING(request.offset_invite_link_); CLEAN_INPUT_STRING(request.offset_invite_link_);
CREATE_REQUEST_PROMISE(); CREATE_REQUEST_PROMISE();
contacts_manager_->get_dialog_invite_links(DialogId(request.chat_id_), UserId(request.administrator_user_id_), contacts_manager_->get_dialog_invite_links(DialogId(request.chat_id_), UserId(request.creator_user_id_),
request.is_revoked_, request.offset_date_, request.offset_invite_link_, request.is_revoked_, request.offset_date_, request.offset_invite_link_,
request.limit_, std::move(promise)); request.limit_, std::move(promise));
} }
@ -6380,7 +6380,7 @@ void Td::on_request(uint64 id, const td_api::deleteAllRevokedChatInviteLinks &re
CHECK_IS_USER(); CHECK_IS_USER();
CREATE_OK_REQUEST_PROMISE(); CREATE_OK_REQUEST_PROMISE();
contacts_manager_->delete_all_revoked_dialog_invite_links(DialogId(request.chat_id_), contacts_manager_->delete_all_revoked_dialog_invite_links(DialogId(request.chat_id_),
UserId(request.administrator_user_id_), std::move(promise)); UserId(request.creator_user_id_), std::move(promise));
} }
void Td::on_request(uint64 id, td_api::checkChatInviteLink &request) { void Td::on_request(uint64 id, td_api::checkChatInviteLink &request) {

View File

@ -2751,14 +2751,14 @@ class CliClient final : public Actor {
send_request(td_api::make_object<td_api::getChatInviteLink>(as_chat_id(chat_id), invite_link)); send_request(td_api::make_object<td_api::getChatInviteLink>(as_chat_id(chat_id), invite_link));
} else if (op == "gcils" || op == "gcilr") { } else if (op == "gcils" || op == "gcilr") {
string chat_id; string chat_id;
string administrator_user_id; string creator_user_id;
int32 offset_date; int32 offset_date;
string offset_invite_link; string offset_invite_link;
string limit; string limit;
get_args(args, chat_id, administrator_user_id, offset_date, offset_invite_link, limit); get_args(args, chat_id, creator_user_id, offset_date, offset_invite_link, limit);
send_request(td_api::make_object<td_api::getChatInviteLinks>(as_chat_id(chat_id), send_request(td_api::make_object<td_api::getChatInviteLinks>(as_chat_id(chat_id), as_user_id(creator_user_id),
as_user_id(administrator_user_id), op == "gcilr", op == "gcilr", offset_date, offset_invite_link,
offset_date, offset_invite_link, as_limit(limit))); as_limit(limit)));
} else if (op == "gcilm") { } else if (op == "gcilm") {
string chat_id; string chat_id;
string invite_link; string invite_link;
@ -2776,10 +2776,10 @@ class CliClient final : public Actor {
send_request(td_api::make_object<td_api::deleteRevokedChatInviteLink>(as_chat_id(chat_id), invite_link)); send_request(td_api::make_object<td_api::deleteRevokedChatInviteLink>(as_chat_id(chat_id), invite_link));
} else if (op == "darcil") { } else if (op == "darcil") {
string chat_id; string chat_id;
string administrator_user_id; string creator_user_id;
get_args(args, chat_id, administrator_user_id); get_args(args, chat_id, creator_user_id);
send_request(td_api::make_object<td_api::deleteAllRevokedChatInviteLinks>(as_chat_id(chat_id), send_request(td_api::make_object<td_api::deleteAllRevokedChatInviteLinks>(as_chat_id(chat_id),
as_user_id(administrator_user_id))); as_user_id(creator_user_id)));
} else if (op == "ccil") { } else if (op == "ccil") {
send_request(td_api::make_object<td_api::checkChatInviteLink>(args)); send_request(td_api::make_object<td_api::checkChatInviteLink>(args));
} else if (op == "jcbil") { } else if (op == "jcbil") {