Skip to content

Commit

Permalink
fix: bot login not working
Browse files Browse the repository at this point in the history
  • Loading branch information
e3ob committed May 14, 2024
1 parent 4b606be commit 3b94018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ func (c *Client) login() error {
if status.Authorized {
return nil
}
if c.NoAutoAuth {
return intErrors.ErrSessionUnauthorized
}
if c.clientType.getType() == clientTypeVPhone {
if c.NoAutoAuth {
return intErrors.ErrSessionUnauthorized
}
err = authFlow(
c.ctx, authClient,
c.authConversator,
Expand Down
2 changes: 1 addition & 1 deletion clientType.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func ClientTypePhone(phoneNumber string) clientType {
type clientTypeBot string

func (v *clientTypeBot) getType() int {
return clientTypeVPhone
return clientTypeVBot
}

func (v clientTypeBot) getValue() string {
Expand Down

0 comments on commit 3b94018

Please sign in to comment.