Skip to content

Commit

Permalink
- Merge Mrs4s#2463
Browse files Browse the repository at this point in the history
  • Loading branch information
moeKedama authored Oct 5, 2023
1 parent 517d323 commit 9e9bd64
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cmd/gocq/qsign.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ func energy(uin uint64, id string, _ string, salt []byte) ([]byte, error) {
// 提交回调 buffer
func signSubmit(uin string, cmd string, callbackID int64, buffer []byte, t string) {
buffStr := hex.EncodeToString(buffer)
tail := 64
endl := "..."
if len(buffStr) < tail {
tail = len(buffStr)
endl = "."
if base.Debug {
tail := 64
endl := "..."
if len(buffStr) < tail {
tail = len(buffStr)
endl = "."
}
log.Debugf("submit (%v): uin=%v, cmd=%v, callbackID=%v, buffer=%v%s", t, uin, cmd, callbackID, buffStr[:tail], endl)
}
log.Infof("submit (%v): uin=%v, cmd=%v, callbackID=%v, buffer=%v%s", t, uin, cmd, callbackID, buffStr[:tail], endl)

signServer, _, err := requestSignServer(
http.MethodGet,
Expand All @@ -208,6 +210,7 @@ func signSubmit(uin string, cmd string, callbackID int64, buffer []byte, t strin
// signCallback
// 刷新 token 和签名的回调
func signCallback(uin string, results []gjson.Result, t string) {
time.Sleep(100 * time.Second)
for _, result := range results {
cmd := result.Get("cmd").String()
callbackID := result.Get("callbackId").Int()
Expand Down

0 comments on commit 9e9bd64

Please sign in to comment.