Update layer 85.

GitOrigin-RevId: 5902d95080c65b2aed40d199f14634dadb30926a
This commit is contained in:
levlam 2018-08-11 00:08:13 +03:00
parent c1c1308ba8
commit 4052bffcd5
7 changed files with 32 additions and 32 deletions

View File

@ -878,12 +878,12 @@ date day:int32 month:int32 year:int32 = Date;
personalDetails first_name:string middle_name:string last_name:string birthdate:date gender:string country_code:string residence_country_code:string = PersonalDetails;
//@description An identity document @number Document number; 1-24 characters @expiry_date Document expiry date; may be null @front_side Front side of the document
//@reverse_side Reverse side of the document; only for driver license and identity card @selfie Selfie with the document; may be null @translations List of files with the document translation
identityDocument number:string expiry_date:date front_side:datedFile reverse_side:datedFile selfie:datedFile translations:vector<datedFile> = IdentityDocument;
//@reverse_side Reverse side of the document; only for driver license and identity card @selfie Selfie with the document; may be null @translation List of files with the document translation
identityDocument number:string expiry_date:date front_side:datedFile reverse_side:datedFile selfie:datedFile translation:vector<datedFile> = IdentityDocument;
//@description An identity document to be saved @number Document number; 1-24 characters @expiry_date Document expiry date, if available @front_side Front side of the document
//@reverse_side Reverse side of the document; only for driver license and identity card @selfie Selfie with the document, if available @translations List of files with the document translation
inputIdentityDocument number:string expiry_date:date front_side:InputFile reverse_side:InputFile selfie:InputFile translations:vector<InputFile> = InputIdentityDocument;
//@reverse_side Reverse side of the document; only for driver license and identity card @selfie Selfie with the document, if available @translation List of files with the document translation
inputIdentityDocument number:string expiry_date:date front_side:InputFile reverse_side:InputFile selfie:InputFile translation:vector<InputFile> = InputIdentityDocument;
//@class PassportElement @description Contains information about a Telegram Passport element
@ -991,11 +991,11 @@ passportElementErrorSourceReverseSide = PassportElementErrorSource;
//@description The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes
passportElementErrorSourceSelfie = PassportElementErrorSource;
//@description The translation of the document contains an error. The error will be considered resolved when the file with the translation changes
passportElementErrorSourceTranslation = PassportElementErrorSource;
//@description One of files with the translation of the document contains an error. The error will be considered resolved when the file changes
passportElementErrorSourceTranslationFile = PassportElementErrorSource;
//@description The list of translations of the document contains an error. The error will be considered resolved when the list of translations changes
passportElementErrorSourceTranslations = PassportElementErrorSource;
//@description The translation of the document contains an error. The error will be considered resolved when the list of translation files changes
passportElementErrorSourceTranslationFiles = PassportElementErrorSource;
//@description The file contains an error. The error will be considered resolved when the file changes
passportElementErrorSourceFile = PassportElementErrorSource;
@ -1019,8 +1019,8 @@ passportAuthorizationForm id:int32 required_types:vector<PassportElementType> el
encryptedCredentials data:bytes hash:bytes secret:bytes = EncryptedCredentials;
//@description Contains information about encrypted Telegram Passport element; for bots only @type Type of Telegram Passport element @data Encrypted JSON-encoded data about the user @front_side The front side of an identity document @reverse_side The reverse side of an identity document; may be null @selfie Selfie with the document; may be null @translations List of files with the document translation @files List of attached files @value Unencrypted data, phone number or email address @hash Hash of the whole element
encryptedPassportElement type:PassportElementType data:bytes front_side:datedFile reverse_side:datedFile selfie:datedFile translations:vector<datedFile> files:vector<datedFile> value:string hash:string = EncryptedPassportElement;
//@description Contains information about encrypted Telegram Passport element; for bots only @type Type of Telegram Passport element @data Encrypted JSON-encoded data about the user @front_side The front side of an identity document @reverse_side The reverse side of an identity document; may be null @selfie Selfie with the document; may be null @translation List of files with the document translation @files List of attached files @value Unencrypted data, phone number or email address @hash Hash of the whole element
encryptedPassportElement type:PassportElementType data:bytes front_side:datedFile reverse_side:datedFile selfie:datedFile translation:vector<datedFile> files:vector<datedFile> value:string hash:string = EncryptedPassportElement;
//@class InputPassportElementErrorSource @description Contains the description of an error in Telegram Passport element; for bots only
@ -1040,11 +1040,11 @@ inputPassportElementErrorSourceReverseSide file_hash:bytes = InputPassportElemen
//@description The selfie contains an error. The error is considered resolved when the file with the selfie changes @file_hash Current hash of the file containing the selfie
inputPassportElementErrorSourceSelfie file_hash:bytes = InputPassportElementErrorSource;
//@description The translation contains an error. The error is considered resolved when the file with the translation changes @file_hash Current hash of the file containing the translation
inputPassportElementErrorSourceTranslation file_hash:bytes = InputPassportElementErrorSource;
//@description One of files with the translation of the document contains an error. The error is considered resolved when the file with the translation changes @file_hash Current hash of the file containing the translation
inputPassportElementErrorSourceTranslationFile file_hash:bytes = InputPassportElementErrorSource;
//@description The list of translation files contains an error. The error is considered resolved when the file list changes @file_hashes Current hashes of all files with the translation
inputPassportElementErrorSourceTranslations file_hashes:vector<bytes> = InputPassportElementErrorSource;
//@description The translation of the document contains an error. The error is considered resolved when the file list changes @file_hashes Current hashes of all files with the translation
inputPassportElementErrorSourceTranslationFiles file_hashes:vector<bytes> = InputPassportElementErrorSource;
//@description The file contains an error. The error is considered resolved when the file changes @file_hash Current hash of the file with an error
inputPassportElementErrorSourceFile file_hash:bytes = InputPassportElementErrorSource;

Binary file not shown.

View File

@ -886,8 +886,8 @@ secureValueErrorSelfie#e537ced6 type:SecureValueType file_hash:bytes text:string
secureValueErrorFile#7a700873 type:SecureValueType file_hash:bytes text:string = SecureValueError;
secureValueErrorFiles#666220e9 type:SecureValueType file_hash:Vector<bytes> text:string = SecureValueError;
secureValueError#869d758f type:SecureValueType hash:bytes text:string = SecureValueError;
secureValueErrorTranslation#5fbc1134 type:SecureValueType file_hash:bytes text:string = SecureValueError;
secureValueErrorTranslations#781e629b type:SecureValueType file_hash:Vector<bytes> text:string = SecureValueError;
secureValueErrorTranslationFile#a1144770 type:SecureValueType file_hash:bytes text:string = SecureValueError;
secureValueErrorTranslationFiles#34636dd8 type:SecureValueType file_hash:Vector<bytes> text:string = SecureValueError;
secureCredentialsEncrypted#33f0ea47 data:bytes hash:bytes secret:bytes = SecureCredentialsEncrypted;

Binary file not shown.

View File

@ -791,18 +791,18 @@ class GetPassportAuthorizationForm : public NetQueryCallback {
source = td_api::make_object<td_api::passportElementErrorSourceSelfie>();
break;
}
case telegram_api::secureValueErrorTranslation::ID: {
auto error = move_tl_object_as<telegram_api::secureValueErrorTranslation>(error_ptr);
case telegram_api::secureValueErrorTranslationFile::ID: {
auto error = move_tl_object_as<telegram_api::secureValueErrorTranslationFile>(error_ptr);
type = get_secure_value_type(error->type_);
message = std::move(error->text_);
source = td_api::make_object<td_api::passportElementErrorSourceTranslation>();
source = td_api::make_object<td_api::passportElementErrorSourceTranslationFile>();
break;
}
case telegram_api::secureValueErrorTranslations::ID: {
auto error = move_tl_object_as<telegram_api::secureValueErrorTranslations>(error_ptr);
case telegram_api::secureValueErrorTranslationFiles::ID: {
auto error = move_tl_object_as<telegram_api::secureValueErrorTranslationFiles>(error_ptr);
type = get_secure_value_type(error->type_);
message = std::move(error->text_);
source = td_api::make_object<td_api::passportElementErrorSourceTranslations>();
source = td_api::make_object<td_api::passportElementErrorSourceTranslationFiles>();
break;
}
default:
@ -949,19 +949,19 @@ void SecureManager::set_secure_value_errors(Td *td, tl_object_ptr<telegram_api::
std::move(type), BufferSlice(source->file_hash_), error->message_));
break;
}
case td_api::inputPassportElementErrorSourceTranslation::ID: {
auto source = td_api::move_object_as<td_api::inputPassportElementErrorSourceTranslation>(error->source_);
input_errors.push_back(make_tl_object<telegram_api::secureValueErrorTranslation>(
case td_api::inputPassportElementErrorSourceTranslationFile::ID: {
auto source = td_api::move_object_as<td_api::inputPassportElementErrorSourceTranslationFile>(error->source_);
input_errors.push_back(make_tl_object<telegram_api::secureValueErrorTranslationFile>(
std::move(type), BufferSlice(source->file_hash_), error->message_));
break;
}
case td_api::inputPassportElementErrorSourceTranslations::ID: {
auto source = td_api::move_object_as<td_api::inputPassportElementErrorSourceTranslations>(error->source_);
case td_api::inputPassportElementErrorSourceTranslationFiles::ID: {
auto source = td_api::move_object_as<td_api::inputPassportElementErrorSourceTranslationFiles>(error->source_);
if (source->file_hashes_.empty()) {
return promise.set_error(Status::Error(400, "File hashes must be non-empty"));
}
auto file_hashes = transform(source->file_hashes_, [](Slice hash) { return BufferSlice(hash); });
input_errors.push_back(make_tl_object<telegram_api::secureValueErrorTranslations>(
input_errors.push_back(make_tl_object<telegram_api::secureValueErrorTranslationFiles>(
std::move(type), std::move(file_hashes), error->message_));
break;
}

View File

@ -874,8 +874,8 @@ static Result<SecureValue> get_identity_document(SecureValueType type, FileManag
TRY_RESULT(selfie, get_secure_file(file_manager, std::move(identity_document->selfie_)));
res.selfie = std::move(selfie);
}
if (!identity_document->translations_.empty()) {
TRY_RESULT(translations, get_secure_files(file_manager, std::move(identity_document->translations_)));
if (!identity_document->translation_.empty()) {
TRY_RESULT(translations, get_secure_files(file_manager, std::move(identity_document->translation_)));
res.translations = std::move(translations);
}
return res;
@ -1406,7 +1406,7 @@ static auto credentials_as_jsonable(const std::vector<SecureValueCredentials> &c
o("selfie", as_jsonable(cred.selfie.value()));
}
if (!cred.translations.empty() && with_translations) {
o("translations", as_jsonable(cred.translations));
o("translation", as_jsonable(cred.translations));
}
}));
}

View File

@ -222,7 +222,7 @@ void FileGenerateManager::generate_file(uint64 query_id, const FullGenerateFileL
Slice conversion = generate_location.conversion_;
auto &query = it_flag.first->second;
if (conversion.copy().truncate(file_id_query.size()) == file_id_query) {
if (begins_with(conversion, file_id_query)) {
auto file_id = FileId(to_integer<int32>(conversion.substr(file_id_query.size())), 0);
query.worker_ = create_actor<FileDownloadGenerateActor>("FileDownloadGenerateActor", generate_location.file_type_,
file_id, std::move(callback), std::move(parent));