diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 78897c876..cd547f18f 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4259,10 +4259,11 @@ firebaseAuthenticationSettingsIos device_token:string is_app_sandbox:Bool = Fire //@allow_flash_call Pass true if the authentication code may be sent via a flash call to the specified phone number //@allow_missed_call Pass true if the authentication code may be sent via a missed call to the specified phone number //@is_current_phone_number Pass true if the authenticated phone number is used on the current device +//@has_unknown_phone_number Pass true if there is a SIM card in the current device, but it is not possible to check whether phone number matches //@allow_sms_retriever_api For official applications only. True, if the application 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 //@firebase_authentication_settings For official Android and iOS applications only; pass null otherwise. Settings for Firebase Authentication //@authentication_tokens List of up to 20 authentication tokens, recently received in updateOption("authentication_token") in previously logged out sessions -phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool firebase_authentication_settings:FirebaseAuthenticationSettings authentication_tokens:vector = PhoneNumberAuthenticationSettings; +phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool has_unknown_phone_number:Bool allow_sms_retriever_api:Bool firebase_authentication_settings:FirebaseAuthenticationSettings authentication_tokens:vector = PhoneNumberAuthenticationSettings; //@description Represents a reaction applied to a message diff --git a/td/telegram/SendCodeHelper.cpp b/td/telegram/SendCodeHelper.cpp index dd87e56bb..eb7da12e0 100644 --- a/td/telegram/SendCodeHelper.cpp +++ b/td/telegram/SendCodeHelper.cpp @@ -62,6 +62,9 @@ telegram_api::object_ptr SendCodeHelper::get_input_c if (settings->is_current_phone_number_) { flags |= telegram_api::codeSettings::CURRENT_NUMBER_MASK; } + if (settings->has_unknown_phone_number_) { + flags |= telegram_api::codeSettings::UNKNOWN_NUMBER_MASK; + } if (settings->allow_sms_retriever_api_) { flags |= telegram_api::codeSettings::ALLOW_APP_HASH_MASK; } diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 726da3c26..57a34485a 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -2320,7 +2320,7 @@ class CliClient final : public Actor { } td_api::object_ptr as_phone_number_authentication_settings() const { - return td_api::make_object(false, true, false, false, nullptr, + return td_api::make_object(false, true, false, false, false, nullptr, vector(authentication_tokens_)); }