by Robin at 20240404

This commit is contained in:
Leufolium 2024-04-04 21:22:19 +08:00
parent 273f7a858c
commit 4bb95ee7c6
1 changed files with 8 additions and 6 deletions

View File

@ -861,13 +861,15 @@ func (s *Service) utilUnThumbsZoneMoment(ctx *gin.Context, req *zonemomentproto.
// 加密未解锁身份的动态 // 加密未解锁身份的动态
func (s *Service) utilEncryptInaccessibleZoneMoment(vo *zonemomentproto.ApiZoneMomentVO) { func (s *Service) utilEncryptInaccessibleZoneMoment(vo *zonemomentproto.ApiZoneMomentVO) {
imageIds := vo.MediaComp.GetImageIds() if util.DerefInt64(vo.MType) == consts.MediaTypeImg {
mediaVisibleRange := util.DerefInt64(vo.MediaVisibleRange) imageIds := vo.MediaComp.GetImageIds()
if len(imageIds) <= int(mediaVisibleRange) { mediaVisibleRange := util.DerefInt64(vo.MediaVisibleRange)
return if len(imageIds) <= int(mediaVisibleRange) {
return
}
imageIds = imageIds[:mediaVisibleRange]
vo.MediaComp.ImageIds = util.Int64Slice(imageIds)
} }
imageIds = imageIds[:mediaVisibleRange]
vo.MediaComp.ImageIds = util.Int64Slice(imageIds)
} }
// 填充动态是否解锁 // 填充动态是否解锁