mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
fix
This commit is contained in:
parent
0eea5d02de
commit
b8950dc04c
1 changed files with 5 additions and 1 deletions
|
|
@ -122,7 +122,11 @@ func (stateHandler *clientAuthorizer) Close() {
|
||||||
func CliInteractor(clientAuthorizer *clientAuthorizer) {
|
func CliInteractor(clientAuthorizer *clientAuthorizer) {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case state := <-clientAuthorizer.State:
|
case state, ok := <-clientAuthorizer.State:
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
switch state.AuthorizationStateType() {
|
switch state.AuthorizationStateType() {
|
||||||
case TypeAuthorizationStateWaitPhoneNumber:
|
case TypeAuthorizationStateWaitPhoneNumber:
|
||||||
fmt.Println("Enter phone number: ")
|
fmt.Println("Enter phone number: ")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue