fix(thunder):no additional processing when the deviceID is correct

pull/2058/head
foxxorcat 2022-10-17 22:37:17 +08:00
parent 0e99e7e9b9
commit fc393f743f
1 changed files with 6 additions and 1 deletions

View File

@ -143,7 +143,12 @@ func (x *ThunderExpert) Init(ctx context.Context, storage model.Storage) (err er
Common: &Common{
client: base.NewRestyClient(),
DeviceID: utils.GetMD5Encode(x.DeviceID),
DeviceID: func() string {
if len(x.DeviceID) != 32 {
return utils.GetMD5Encode(x.DeviceID)
}
return x.DeviceID
}(),
ClientID: x.ClientID,
ClientSecret: x.ClientSecret,
ClientVersion: x.ClientVersion,