From 7d2150c2d78c4a08d9a0e40597e412f5f3991173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=80=A1=E7=84=B6?= <63996691+zhaodice@users.noreply.github.com> Date: Sun, 12 Mar 2023 13:16:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BD=BF=E9=80=BB=E8=BE=91=E6=9B=B4?= =?UTF-8?q?=E5=8A=A0=E7=A7=91=E5=AD=A6=EF=BC=88x=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/builders.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/builders.go b/client/builders.go index ea01fe00..17f0a8d6 100644 --- a/client/builders.go +++ b/client/builders.go @@ -116,7 +116,7 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) { t.Append(t544) } } - if c.Device().QImei36 != "" { + if c.Device().QImei16 != "" { t.Append(tlv.T545([]byte(c.Device().QImei16))) } else { t.Append(tlv.T545([]byte(c.Device().IMEI))) @@ -463,7 +463,7 @@ func (c *QQClient) buildRequestTgtgtNopicsigPacket() (uint16, []byte) { tlv.T525(tlv.T536([]byte{0x01, 0x00})), }, } - if c.Device().QImei36 != "" { + if c.Device().QImei16 != "" { t.Append(tlv.T545([]byte(c.Device().QImei16))) } else { t.Append(tlv.T545([]byte(c.Device().IMEI))) From 71e86b9b3dc48e558ebcfde438be61242079637a Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Mon, 13 Mar 2023 01:23:04 +0800 Subject: [PATCH 2/2] rename: AppVersion.ReadJson -> AppVersion.UpdateFromJson --- client/global.go | 2 +- client/internal/auth/auth.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/global.go b/client/global.go index c13f4108..9ce718e7 100644 --- a/client/global.go +++ b/client/global.go @@ -110,7 +110,7 @@ func UpdateAppVersion(protocolType auth.ProtocolType, data []byte) error { if _, ok := auth.AppVersions[protocolType]; !ok { return errors.New("unknown protocol type: " + strconv.Itoa(int(protocolType))) } - return auth.AppVersions[protocolType].ReadJson(data) + return auth.AppVersions[protocolType].UpdateFromJson(data) } func getSSOAddress(device *auth.Device) ([]netip.AddrPort, error) { diff --git a/client/internal/auth/auth.go b/client/internal/auth/auth.go index f2ca18b8..1a91754a 100644 --- a/client/internal/auth/auth.go +++ b/client/internal/auth/auth.go @@ -168,7 +168,7 @@ func (v *AppVersion) String() string { return fmt.Sprintf("%s %s - %v", v.Protocol.String(), v.SortVersionName, v.BuildTime) } -func (v *AppVersion) ReadJson(d []byte) error { +func (v *AppVersion) UpdateFromJson(d []byte) error { var f appVersionFile if err := json.Unmarshal(d, &f); err != nil { return errors.Wrap(err, "failed to unmarshal json message")