fix a problem with Logout

This commit is contained in:
ivy1996-encode 2021-03-16 18:00:30 +08:00
parent e44cf1e557
commit e07a798a08

3
bot.go
View File

@ -70,6 +70,7 @@ func (b *Bot) Login() error {
}
func (b *Bot) Logout() error {
if b.Alive() {
info := b.storage.GetLoginInfo()
if err := b.Caller.Logout(info); err != nil {
return err
@ -77,6 +78,8 @@ func (b *Bot) Logout() error {
b.stopAsyncCALL(errors.New("logout"))
return nil
}
return errors.New("user not login")
}
// 登录逻辑
func (b *Bot) login(data []byte) error {