Update td_api::phoneNumberAuthenticationSettings class.

GitOrigin-RevId: 98dd6d4c5a5521e69b3dc51c648c6ca7af1ffae7
This commit is contained in:
levlam 2019-07-27 18:16:12 +03:00
parent fca1fcc789
commit d3091e3374
3 changed files with 4 additions and 9 deletions

View File

@ -1634,9 +1634,8 @@ call id:int32 user_id:int32 is_outgoing:Bool state:CallState = Call;
//@description Contains settings for the authentication of the user's phone number
//@allow_flash_call Pass true if the authentication code may be sent via flash call to the specified phone number
//@is_current_phone_number Pass true if the authenticated phone number is used on the current device
//@app_specific_sms_token For official applications only. A single use app specific 11-character token received from SmsManager.createAppSpecificSmsToken if the app is run on Android >= 26 and the authentication code is allowed to be automatically received from the SMS. If specified, this token is preferred over app_hash_string
//@app_hash_string For official applications only. An 11-character hash string that identifies the app if the app can use Android SMS Retriever API (requires Google Play Services >= 11.0). See https://developers.google.com/identity/sms-retriever/ for more details
phoneNumberAuthenticationSettings allow_flash_call:Bool is_current_phone_number:Bool app_specific_sms_token:string app_hash_string:string = PhoneNumberAuthenticationSettings;
//@allow_sms_retriever_api For official applications only. True, if the app can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details
phoneNumberAuthenticationSettings allow_flash_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool = PhoneNumberAuthenticationSettings;
//@description Represents a list of animations @animations List of animations

Binary file not shown.

View File

@ -48,14 +48,10 @@ telegram_api::object_ptr<telegram_api::codeSettings> SendCodeHelper::get_input_c
if (settings->is_current_phone_number_) {
flags |= telegram_api::codeSettings::CURRENT_NUMBER_MASK;
}
if (check_utf8(settings->app_specific_sms_token_) && !settings->app_specific_sms_token_.empty()) {
app_hash = settings->app_specific_sms_token_;
} else if (check_utf8(settings->app_hash_string_) && !settings->app_hash_string_.empty()) {
if (settings->allow_sms_retriever_api_) {
flags |= telegram_api::codeSettings::APP_HASH_PERSISTENT_MASK;
app_hash = settings->app_hash_string_;
}
if (!app_hash.empty()) {
flags |= telegram_api::codeSettings::APP_HASH_MASK;
app_hash = "ignored1234";
}
}
return telegram_api::make_object<telegram_api::codeSettings>(flags, false /*ignored*/, false /*ignored*/,