mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
feature ipad protocol & fix error image panic.
This commit is contained in:
parent
b51d8b417c
commit
c1739dba15
@ -252,7 +252,7 @@ const (
|
||||
Member
|
||||
|
||||
AndroidPhone ClientProtocol = 1
|
||||
AndroidPad ClientProtocol = 2
|
||||
IPad ClientProtocol = 2
|
||||
AndroidWatch ClientProtocol = 3
|
||||
)
|
||||
|
||||
|
@ -106,7 +106,7 @@ var SystemDeviceInfo = &DeviceInfo{
|
||||
IMEI: "468356291846738",
|
||||
AndroidId: []byte("MIRAI.123456.001"),
|
||||
APN: []byte("wifi"),
|
||||
Protocol: AndroidPad,
|
||||
Protocol: IPad,
|
||||
Version: &Version{
|
||||
Incremental: []byte("5891938"),
|
||||
Release: []byte("10"),
|
||||
@ -171,10 +171,10 @@ func genVersionInfo(p ClientProtocol) *versionInfo {
|
||||
SubSigmap: 0x10400,
|
||||
MainSigMap: 34869472,
|
||||
}
|
||||
case AndroidPad: // Dumped from qq-hd v5.8.9
|
||||
case IPad:
|
||||
return &versionInfo{
|
||||
ApkId: "com.tencent.minihd.qq",
|
||||
AppId: 537065549,
|
||||
AppId: 537065739,
|
||||
SortVersionName: "5.8.9",
|
||||
BuildTime: 1595836208,
|
||||
ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199},
|
||||
@ -201,7 +201,7 @@ func (info *DeviceInfo) ToJson() []byte {
|
||||
IMEI: info.IMEI,
|
||||
Protocol: func() int {
|
||||
switch info.Protocol {
|
||||
case AndroidPad:
|
||||
case IPad:
|
||||
return 0
|
||||
case AndroidPhone:
|
||||
return 1
|
||||
@ -238,7 +238,7 @@ func (info *DeviceInfo) ReadJson(d []byte) error {
|
||||
case 2:
|
||||
info.Protocol = AndroidWatch
|
||||
default:
|
||||
info.Protocol = AndroidPad
|
||||
info.Protocol = IPad
|
||||
}
|
||||
SystemDeviceInfo.GenNewGuid()
|
||||
SystemDeviceInfo.GenNewTgtgtKey()
|
||||
|
@ -33,7 +33,7 @@ type (
|
||||
// grayTipProcessor 提取出来专门用于处理群内 notify tips
|
||||
func (c *QQClient) grayTipProcessor(groupId int64, tipInfo *notify.GeneralGrayTipInfo) {
|
||||
switch tipInfo.TemplId {
|
||||
case 10043, 1136: // 戳一戳
|
||||
case 10043, 1136, 1132: // 戳一戳
|
||||
var sender int64 = 0
|
||||
receiver := c.Uin
|
||||
for _, templ := range tipInfo.MsgTemplParam {
|
||||
|
@ -432,6 +432,9 @@ func ParseMessageElems(elems []*msg.Elem) []IMessageElement {
|
||||
}
|
||||
}
|
||||
if elem.CustomFace != nil {
|
||||
if len(elem.CustomFace.Md5) == 0 {
|
||||
continue
|
||||
}
|
||||
res = append(res, &ImageElement{
|
||||
Filename: elem.CustomFace.FilePath,
|
||||
Size: elem.CustomFace.Size,
|
||||
|
Loading…
x
Reference in New Issue
Block a user