From d3091e3374f902732edf26f31629935cf49b3363 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 27 Jul 2019 18:16:12 +0300 Subject: [PATCH] Update td_api::phoneNumberAuthenticationSettings class. GitOrigin-RevId: 98dd6d4c5a5521e69b3dc51c648c6ca7af1ffae7 --- td/generate/scheme/td_api.tl | 5 ++--- td/generate/scheme/td_api.tlo | Bin 156284 -> 156244 bytes td/telegram/SendCodeHelper.cpp | 8 ++------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index d7e2bca8..31741680 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -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 diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 6b38b1bcd90c5b776dd556146d2a4c0281058fc1..9cdc7034ac0fb8e7343583033165b74022451d3f 100644 GIT binary patch delta 149 zcmex!g!9S~&J8D|SzfL>d8YY{^!78-j6MQvAf95u-+XyMnMY4yJI6`J8zpe=bQU|N d0yuB`3_B(XMplpwjME$UGRkkiV$ZZf2>|==L7V^p delta 156 zcmca|g!9i4&J8D|S={#@HEcd3z5R?dqmKX^h^JUE`JA*8Cy06Tn2-<4bWa_|WI?gS zf`a(sg4E>9w9MrA;@slNXSd4>@PkA%5{on9i%W_!^U^0T(3b%lx&4U_ 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(flags, false /*ignored*/, false /*ignored*/,