Commit 0a48e06b authored by hujiebin's avatar hujiebin

fix:headwearIcon

parent b4f02941
......@@ -398,14 +398,9 @@ func getMicIContent(model *domain.Model, groupId string, i int) (MicContent, err
return MicContent{}, err
}
var micEffect string
var headwearIcon string
if micUser.CpUserId > 0 {
if cpUser, _ := user_m.GetUser(model, micUser.CpUserId); cpUser != nil {
headwearIcon = cpUser.Avatar
}
micEffect = "https://image.whoisamy.shop/hilo/resource/svga/mic_effect_cp.svga"
micUserData.MicEffect = micEffect
micUserData.HeadwearIcon = headwearIcon
}
return MicContent{
GroupId: txGroupId,
......@@ -524,6 +519,11 @@ func getMicUserData(model *domain.Model, userId uint64) (*MicUserData, error) {
headwearPicUrl = resHeadwear.PicUrl
headwearEffectUrl = resHeadwear.EffectUrl
}
var headwearIcon string
if cpRelation, _ := rpc.GetUserCpRelation(model, userId); len(cpRelation.CpUserAvatar) > 0 {
headwearIcon = cpRelation.CpUserAvatar
}
return &MicUserData{
Id: user.ID,
ExternalId: user.ExternalId,
......@@ -537,5 +537,6 @@ func getMicUserData(model *domain.Model, userId uint64) (*MicUserData, error) {
HeadwearEffectUrl: headwearEffectUrl,
SvipLevel: svip.SvipLevel,
Svip: rpc.CopySimpleSvip(svip),
HeadwearIcon: headwearIcon,
}, nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment