Skip to content

Commit

Permalink
fix: login.SubmitCaptcha & fmt & update (#14)
Browse files Browse the repository at this point in the history
* fix: login.SubmitCaptcha & fmt

* fix: login.SubmitCaptcha & fmt
  • Loading branch information
icarus-ai authored Nov 15, 2024
1 parent cf86eab commit 7ab0de5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
10 changes: 4 additions & 6 deletions cmd/gocq/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ import (

"github.com/Mrs4s/go-cqhttp/internal/download"

"github.com/LagrangeDev/LagrangeGo/utils"

"github.com/LagrangeDev/LagrangeGo/client/packets/wtlogin/qrcodestate"

"github.com/LagrangeDev/LagrangeGo/client"
"github.com/LagrangeDev/LagrangeGo/client/auth"
"github.com/LagrangeDev/LagrangeGo/client/packets/wtlogin/qrcodestate"
"github.com/LagrangeDev/LagrangeGo/utils"

"github.com/LagrangeDev/LagrangeGo/client"
"github.com/mattn/go-colorable"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -209,7 +207,7 @@ func loginResponseProcessor(res *client.LoginResponse) error {
readLine()
os.Exit(0)
}
res, err = cli.SubmitCaptcha(strings.Split(strings.Split(res.VerifyURL, "sid=")[1], "&")[0], ticket, randStr)
res, err = cli.SubmitCaptcha(ticket, randStr, strings.Split(strings.Split(res.VerifyURL, "sid=")[1], "&")[0])
continue
//case client.NeedCaptcha:
// log.Warnf("登录需要验证码.")
Expand Down
11 changes: 4 additions & 7 deletions coolq/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ import (
"strconv"
"strings"

"github.com/LagrangeDev/LagrangeGo/utils/binary"
log "github.com/sirupsen/logrus"

"github.com/LagrangeDev/LagrangeGo/client"
"github.com/LagrangeDev/LagrangeGo/client/entity"

event2 "github.com/LagrangeDev/LagrangeGo/client/event"

"github.com/LagrangeDev/LagrangeGo/message"

"github.com/LagrangeDev/LagrangeGo/client"
log "github.com/sirupsen/logrus"
"github.com/LagrangeDev/LagrangeGo/utils/binary"

"github.com/Mrs4s/go-cqhttp/db"
"github.com/Mrs4s/go-cqhttp/global"
Expand Down Expand Up @@ -569,7 +566,7 @@ func (bot *CQBot) checkMedia(e []message.IMessageElement, source message.Source)
})
filename := hex.EncodeToString(i.Md5) + ".video"
cache.Video.Insert(i.Md5, data)
i.URL, _ = bot.Client.GetVideoURL(source.SourceType == message.SourceGroup, i)
i.URL, _ = bot.Client.GetVideoURL(source.SourceType == message.SourceGroup, i.UUID)
i.Name = filename
}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/FloatTech/sqlite v1.6.3
github.com/LagrangeDev/LagrangeGo v0.1.2-0.20241114034146-304fa373b532
github.com/LagrangeDev/LagrangeGo v0.0.0-20241114153145-593cc9695c20
github.com/Microsoft/go-winio v0.6.2-0.20230724192519-b29bbd58a65a
github.com/RomiChan/syncx v0.0.0-20240418144900-b7402ffdebc7
github.com/RomiChan/websocket v1.4.3-0.20220227141055-9b2c6168c9c5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/FloatTech/sqlite v1.6.3 h1:MQkqBNlkPuCoKQQgoNLuTL/2Ci3tBTFAnVYBdD0Wy4
github.com/FloatTech/sqlite v1.6.3/go.mod h1:zFbHzRfB+CJ+VidfjuVbrcin3DAz283F7hF1hIeHzpY=
github.com/FloatTech/ttl v0.0.0-20230307105452-d6f7b2b647d1 h1:g4pTnDJUW4VbJ9NvoRfUvdjDrHz/6QhfN/LoIIpICbo=
github.com/FloatTech/ttl v0.0.0-20230307105452-d6f7b2b647d1/go.mod h1:fHZFWGquNXuHttu9dUYoKuNbm3dzLETnIOnm1muSfDs=
github.com/LagrangeDev/LagrangeGo v0.1.2-0.20241114034146-304fa373b532 h1:fcNkzgqc31OKtBm19XyT6GXKF/OvH9bWvmiUKKENjTM=
github.com/LagrangeDev/LagrangeGo v0.1.2-0.20241114034146-304fa373b532/go.mod h1:m7ydyvA8DKOg5c6iTFDfNtfIK9uhqXVJKRXl4mlGkTA=
github.com/LagrangeDev/LagrangeGo v0.0.0-20241114153145-593cc9695c20 h1:lmRVigl2YEk2ww3HirJ305vudIC0vYLVpvSSHdP33w8=
github.com/LagrangeDev/LagrangeGo v0.0.0-20241114153145-593cc9695c20/go.mod h1:m7ydyvA8DKOg5c6iTFDfNtfIK9uhqXVJKRXl4mlGkTA=
github.com/Microsoft/go-winio v0.6.2-0.20230724192519-b29bbd58a65a h1:aU1703IHxupjzipvhu16qYKLMR03e+8WuNR+JMsKfGU=
github.com/Microsoft/go-winio v0.6.2-0.20230724192519-b29bbd58a65a/go.mod h1:OZqLNXdYJHmx7aqq/T6wAdFEdoGm5nmIfC4kU7M8P8o=
github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d h1:/Xuj3fIiMY2ls1TwvPKmaqQrtJsPY+c9s+0lOScVHd8=
Expand Down

0 comments on commit 7ab0de5

Please sign in to comment.