修改登录回调逻辑
This commit is contained in:
parent
dd0d6603a7
commit
7b4a856cea
5
bot.go
5
bot.go
@ -141,10 +141,13 @@ func (b *Bot) LoginWithUUID(uuid string) error {
|
|||||||
switch resp.Code {
|
switch resp.Code {
|
||||||
case StatusSuccess:
|
case StatusSuccess:
|
||||||
// 判断是否有登录回调,如果有执行它
|
// 判断是否有登录回调,如果有执行它
|
||||||
|
if err = b.HandleLogin(resp.Raw); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if b.LoginCallBack != nil {
|
if b.LoginCallBack != nil {
|
||||||
b.LoginCallBack(resp.Raw)
|
b.LoginCallBack(resp.Raw)
|
||||||
}
|
}
|
||||||
return b.HandleLogin(resp.Raw)
|
return nil
|
||||||
case StatusScanned:
|
case StatusScanned:
|
||||||
// 执行扫码回调
|
// 执行扫码回调
|
||||||
if b.ScanCallBack != nil {
|
if b.ScanCallBack != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user