mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
Merge branch 'Mrs4s:master' into master
This commit is contained in:
commit
933005a6aa
@ -116,7 +116,7 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) {
|
|||||||
t.Append(t544)
|
t.Append(t544)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if c.Device().QImei36 != "" {
|
if c.Device().QImei16 != "" {
|
||||||
t.Append(tlv.T545([]byte(c.Device().QImei16)))
|
t.Append(tlv.T545([]byte(c.Device().QImei16)))
|
||||||
} else {
|
} else {
|
||||||
t.Append(tlv.T545([]byte(c.Device().IMEI)))
|
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})),
|
tlv.T525(tlv.T536([]byte{0x01, 0x00})),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if c.Device().QImei36 != "" {
|
if c.Device().QImei16 != "" {
|
||||||
t.Append(tlv.T545([]byte(c.Device().QImei16)))
|
t.Append(tlv.T545([]byte(c.Device().QImei16)))
|
||||||
} else {
|
} else {
|
||||||
t.Append(tlv.T545([]byte(c.Device().IMEI)))
|
t.Append(tlv.T545([]byte(c.Device().IMEI)))
|
||||||
|
@ -110,7 +110,7 @@ func UpdateAppVersion(protocolType auth.ProtocolType, data []byte) error {
|
|||||||
if _, ok := auth.AppVersions[protocolType]; !ok {
|
if _, ok := auth.AppVersions[protocolType]; !ok {
|
||||||
return errors.New("unknown protocol type: " + strconv.Itoa(int(protocolType)))
|
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) {
|
func getSSOAddress(device *auth.Device) ([]netip.AddrPort, error) {
|
||||||
|
@ -168,7 +168,7 @@ func (v *AppVersion) String() string {
|
|||||||
return fmt.Sprintf("%s %s - %v", v.Protocol.String(), v.SortVersionName, v.BuildTime)
|
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
|
var f appVersionFile
|
||||||
if err := json.Unmarshal(d, &f); err != nil {
|
if err := json.Unmarshal(d, &f); err != nil {
|
||||||
return errors.Wrap(err, "failed to unmarshal json message")
|
return errors.Wrap(err, "failed to unmarshal json message")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user