1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

fix: add missing qua (app version) (#342)

This commit is contained in:
Lumine 2023-10-10 09:26:00 +08:00 committed by GitHub
parent ee8edcfe32
commit c025459da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,18 +178,20 @@ func (v *AppVersion) UpdateFromJson(d []byte) error {
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")
} }
// 按 AppVersion 字段顺序赋值,以免遗漏
v.ApkSign, _ = hex.DecodeString(f.ApkSign)
v.ApkId = f.ApkId v.ApkId = f.ApkId
v.SortVersionName = f.SortVersionName
v.SdkVersion = f.SdkVersion
v.AppId = f.AppId v.AppId = f.AppId
v.SubAppId = f.SubAppId v.SubAppId = f.SubAppId
v.AppKey = f.AppKey v.AppKey = f.AppKey
v.SortVersionName = f.SortVersionName
v.BuildTime = f.BuildTime v.BuildTime = f.BuildTime
v.ApkSign, _ = hex.DecodeString(f.ApkSign)
v.SdkVersion = f.SdkVersion
v.SSOVersion = f.SSOVersion v.SSOVersion = f.SSOVersion
v.MiscBitmap = f.MiscBitmap v.MiscBitmap = f.MiscBitmap
v.SubSigmap = f.SubSigmap v.SubSigmap = f.SubSigmap
v.MainSigMap = f.MainSigMap v.MainSigMap = f.MainSigMap
v.QUA = f.QUA
v.Protocol = f.ProtocolType v.Protocol = f.ProtocolType
return nil return nil
} }