Update layer 123.

This commit is contained in:
levlam 2021-01-26 13:07:03 +03:00
parent f5f16a1f5d
commit 6878b41dc7
9 changed files with 14 additions and 62 deletions

View File

@ -4418,43 +4418,6 @@ importMessages chat_id:int53 message_file:InputFile attached_files:vector<InputF
//@description Replaces current permanent invite link for a chat with a new permanent invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right @chat_id Chat identifier
replacePermanentChatInviteLink chat_id:int53 = ChatInviteLink;
//@description Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat
//@chat_id Chat identifier
//@expire_date Point in time (Unix timestamp) when the link will expire; pass 0 if never
//@member_limit Maximum number of chat members that can join the chat by the link simultaneously; 0-100000; pass 0 if not limited
createChatInviteLink chat_id:int53 expire_date:int32 member_limit:int32 = ChatInviteLink;
//@description Edits a non-permanent invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat
//@chat_id Chat identifier
//@invite_link Invite link to be edited
//@expire_date Point in time (Unix timestamp) when the link will expire; pass 0 if never
//@member_limit Maximum number of chat members that can join the chat by the link simultaneously; 0-100000; pass 0 if not limited
editChatInviteLink chat_id:int53 invite_link:string expire_date:int32 member_limit:int32 = ChatInviteLink;
//@description Returns exported invite links for a chat. Requires administrator privileges and can_invite_users right in the chat
//@chat_id Chat identifier
//@administrator_user_id If not 0, only invite links created by the specified administrator will be returned
//@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_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
getChatInviteLinks chat_id:int53 administrator_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 @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
getChatInviteLinkMembers chat_id:int53 invite_link:string offset_member:chatInviteLinkMember limit:int32 = ChatInviteLinkMembers;
//@description Revokes a non-permanent invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat
//@chat_id Chat identifier
//@invite_link Invite link to be revoked
revokeChatInviteLink chat_id:int53 invite_link:string = ChatInviteLink;
//@description Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat @chat_id Chat identifier @invite_link Invite link to revoke
deleteRevokedChatInviteLink chat_id:int53 invite_link:string = Ok;
//@description Deletes all revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat @chat_id Chat identifier
deleteAllRevokedChatInviteLinks chat_id:int53 = 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 begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"
checkChatInviteLink invite_link:string = ChatInviteLinkInfo;

Binary file not shown.

View File

@ -1195,14 +1195,6 @@ inlineQueryPeerTypeChat#d766c50a = InlineQueryPeerType;
inlineQueryPeerTypeMegagroup#5ec4be43 = InlineQueryPeerType;
inlineQueryPeerTypeBroadcast#6334ee9a = InlineQueryPeerType;
chatInviteImporter#1e3e6680 user_id:int date:int = ChatInviteImporter;
messages.exportedChatInvites#bdc62dcc count:int invites:Vector<ExportedChatInvite> users:Vector<User> = messages.ExportedChatInvites;
messages.exportedChatInvite#1871be50 invite:ExportedChatInvite users:Vector<User> = messages.ExportedChatInvite;
messages.chatInviteImporters#81b6b00a count:int importers:Vector<ChatInviteImporter> users:Vector<User> = messages.ChatInviteImporters;
messages.historyImport#1662af0b id:long = messages.HistoryImport;
messages.historyImportParsed#5e0fb7b9 flags:# pm:flags.0?true group:flags.1?true title:flags.2?string = messages.HistoryImportParsed;
@ -1458,11 +1450,6 @@ messages.getReplies#24b581ba peer:InputPeer msg_id:int offset_id:int offset_date
messages.getDiscussionMessage#446972fd peer:InputPeer msg_id:int = messages.DiscussionMessage;
messages.readDiscussion#f731a9f4 peer:InputPeer msg_id:int read_max_id:int = Bool;
messages.unpinAllMessages#f025bc8b peer:InputPeer = messages.AffectedHistory;
messages.getExportedChatInvites#6a72ac6c flags:# revoked:flags.3?true peer:InputPeer admin_id:flags.0?InputUser offset_date:flags.2?int offset_link:flags.2?string limit:int = messages.ExportedChatInvites;
messages.editExportedChatInvite#2e4ffbe flags:# revoked:flags.2?true peer:InputPeer link:string expire_date:flags.0?int usage_limit:flags.1?int = messages.ExportedChatInvite;
messages.deleteRevokedExportedChatInvites#52041463 peer:InputPeer = Bool;
messages.deleteExportedChatInvite#d464a42b peer:InputPeer link:string = Bool;
messages.getChatInviteImporters#26fb7289 peer:InputPeer link:string offset_date:int offset_user:InputUser limit:int = messages.ChatInviteImporters;
messages.deleteChat#83247d11 chat_id:int = Bool;
messages.deletePhoneCallHistory#f9cbe409 flags:# revoke:flags.0?true = messages.AffectedFoundMessages;
messages.checkHistoryImport#43fe19f3 import_head:string = messages.HistoryImportParsed;

Binary file not shown.

View File

@ -1626,7 +1626,7 @@ class ExportChatInviteLinkQuery : public Td::ResultHandler {
promise_.set_error(std::move(status));
}
};
/*
class EditChatInviteLinkQuery : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLink>> promise_;
DialogId dialog_id_;
@ -1649,7 +1649,7 @@ class EditChatInviteLinkQuery : public Td::ResultHandler {
flags |= telegram_api::messages_editExportedChatInvite::REVOKED_MASK;
}
send_query(G()->net_query_creator().create(telegram_api::messages_editExportedChatInvite(
flags, false /*ignored*/, std::move(input_peer), invite_link, expire_date, usage_limit)));
flags, false / *ignored* /, std::move(input_peer), invite_link, expire_date, usage_limit)));
}
void on_result(uint64 id, BufferSlice packet) override {
@ -1707,7 +1707,7 @@ class GetExportedChatInvitesQuery : public Td::ResultHandler {
flags |= telegram_api::messages_getExportedChatInvites::REVOKED_MASK;
}
send_query(G()->net_query_creator().create(
telegram_api::messages_getExportedChatInvites(flags, false /*ignored*/, std::move(input_peer),
telegram_api::messages_getExportedChatInvites(flags, false / *ignored* /, std::move(input_peer),
std::move(input_user), offset_date, offset_invite_link, limit)));
}
@ -1874,7 +1874,7 @@ class DeleteRevokedExportedChatInvitesQuery : public Td::ResultHandler {
promise_.set_error(std::move(status));
}
};
*/
class CheckDialogInviteLinkQuery : public Td::ResultHandler {
Promise<Unit> promise_;
string invite_link_;
@ -7218,7 +7218,7 @@ void ContactsManager::export_dialog_invite_link_impl(DialogId dialog_id, int32 e
td_->create_handler<ExportChatInviteLinkQuery>(std::move(promise))
->send(dialog_id, expire_date, usage_limit, is_permanent);
}
/*
void ContactsManager::edit_dialog_invite_link(DialogId dialog_id, const string &invite_link, int32 expire_date,
int32 usage_limit, bool is_revoked,
Promise<td_api::object_ptr<td_api::chatInviteLink>> &&promise) {
@ -7281,7 +7281,7 @@ void ContactsManager::delete_all_revoked_dialog_invite_links(DialogId dialog_id,
td_->create_handler<DeleteRevokedExportedChatInvitesQuery>(std::move(promise))->send(dialog_id);
}
*/
void ContactsManager::check_dialog_invite_link(const string &invite_link, Promise<Unit> &&promise) const {
if (invite_link_infos_.count(invite_link) > 0) {
return promise.set_value(Unit());

View File

@ -396,7 +396,7 @@ class ContactsManager : public Actor {
void export_dialog_invite_link(DialogId dialog_id, int32 expire_date, int32 usage_limit, bool is_permanent,
Promise<td_api::object_ptr<td_api::chatInviteLink>> &&promise);
/*
void edit_dialog_invite_link(DialogId dialog_id, const string &link, int32 expire_date, int32 usage_limit,
bool is_revoked, Promise<td_api::object_ptr<td_api::chatInviteLink>> &&promise);
@ -411,7 +411,7 @@ class ContactsManager : public Actor {
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, Promise<Unit> &&promise);
*/
void check_dialog_invite_link(const string &invite_link, Promise<Unit> &&promise) const;
void import_dialog_invite_link(const string &invite_link, Promise<DialogId> &&promise);

View File

@ -6311,7 +6311,7 @@ void Td::on_request(uint64 id, const td_api::replacePermanentChatInviteLink &req
CREATE_REQUEST_PROMISE();
contacts_manager_->export_dialog_invite_link(DialogId(request.chat_id_), 0, 0, true, std::move(promise));
}
/*
void Td::on_request(uint64 id, const td_api::createChatInviteLink &request) {
CREATE_REQUEST_PROMISE();
contacts_manager_->export_dialog_invite_link(DialogId(request.chat_id_), request.expire_date_, request.member_limit_,
@ -6359,7 +6359,7 @@ void Td::on_request(uint64 id, const td_api::deleteAllRevokedChatInviteLinks &re
CREATE_OK_REQUEST_PROMISE();
contacts_manager_->delete_all_revoked_dialog_invite_links(DialogId(request.chat_id_), std::move(promise));
}
*/
void Td::on_request(uint64 id, td_api::checkChatInviteLink &request) {
CHECK_IS_USER();
CLEAN_INPUT_STRING(request.invite_link_);

View File

@ -793,7 +793,7 @@ class Td final : public NetQueryCallback {
void on_request(uint64 id, td_api::getChatAdministrators &request);
void on_request(uint64 id, const td_api::replacePermanentChatInviteLink &request);
/*
void on_request(uint64 id, const td_api::createChatInviteLink &request);
void on_request(uint64 id, td_api::editChatInviteLink &request);
@ -807,7 +807,7 @@ class Td final : public NetQueryCallback {
void on_request(uint64 id, td_api::deleteRevokedChatInviteLink &request);
void on_request(uint64 id, const td_api::deleteAllRevokedChatInviteLinks &request);
*/
void on_request(uint64 id, td_api::checkChatInviteLink &request);
void on_request(uint64 id, td_api::joinChatByInviteLink &request);

View File

@ -2696,6 +2696,7 @@ class CliClient final : public Actor {
} else if (op == "rpcil") {
string chat_id = args;
send_request(td_api::make_object<td_api::replacePermanentChatInviteLink>(as_chat_id(chat_id)));
/*
} else if (op == "ccilt") {
string chat_id;
int32 expire_date;
@ -2743,6 +2744,7 @@ class CliClient final : public Actor {
} else if (op == "darcil") {
string chat_id = args;
send_request(td_api::make_object<td_api::deleteAllRevokedChatInviteLinks>(as_chat_id(chat_id)));
*/
} else if (op == "ccil") {
send_request(td_api::make_object<td_api::checkChatInviteLink>(args));
} else if (op == "jcbil") {