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