Support new authorization flow in tdclient test.

This commit is contained in:
levlam 2022-09-08 08:48:11 +03:00
parent 8d32a1e143
commit e8d78263b9

View File

@ -214,6 +214,13 @@ class DoAuthentication final : public TestClinetTask {
case td::td_api::authorizationStateWaitPhoneNumber::ID: case td::td_api::authorizationStateWaitPhoneNumber::ID:
function = td::make_tl_object<td::td_api::setAuthenticationPhoneNumber>(phone_, nullptr); function = td::make_tl_object<td::td_api::setAuthenticationPhoneNumber>(phone_, nullptr);
break; break;
case td::td_api::authorizationStateWaitEmailAddress::ID:
function = td::make_tl_object<td::td_api::setAuthenticationEmailAddress>("alice_test@gmail.com");
break;
case td::td_api::authorizationStateWaitEmailCode::ID:
function = td::make_tl_object<td::td_api::checkAuthenticationEmailCode>(
td::make_tl_object<td::td_api::emailAddressAuthenticationCode>(code_));
break;
case td::td_api::authorizationStateWaitCode::ID: case td::td_api::authorizationStateWaitCode::ID:
function = td::make_tl_object<td::td_api::checkAuthenticationCode>(code_); function = td::make_tl_object<td::td_api::checkAuthenticationCode>(code_);
break; break;