mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
registration fix
This commit is contained in:
parent
d892a9395a
commit
997dc1006a
2 changed files with 5 additions and 3 deletions
|
|
@ -98,7 +98,7 @@ func (stateHandler *clientAuthorizer) Handle(client *Client, state Authorization
|
|||
return ErrNotSupportedAuthorizationState
|
||||
}
|
||||
|
||||
func CliInteractor(clientAuthorizer *clientAuthorizer, registration bool) {
|
||||
func CliInteractor(clientAuthorizer *clientAuthorizer) {
|
||||
for {
|
||||
select {
|
||||
case state := <-clientAuthorizer.State:
|
||||
|
|
@ -118,7 +118,9 @@ func CliInteractor(clientAuthorizer *clientAuthorizer, registration bool) {
|
|||
fmt.Println("Enter code: ")
|
||||
fmt.Scanln(&code)
|
||||
|
||||
if registration {
|
||||
if !state.(*AuthorizationStateWaitCode).IsRegistered {
|
||||
fmt.Println("Phone number is not registered.")
|
||||
|
||||
fmt.Println("Enter first name: ")
|
||||
fmt.Scanln(&firstName)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue