fix(home): 최근 활동 라이브 활성 필터를 제거한다
This commit is contained in:
@@ -148,8 +148,7 @@ class DefaultHomeRecommendationQueryRepository(
|
|||||||
lr.id as target_sort_id
|
lr.id as target_sort_id
|
||||||
from live_room lr
|
from live_room lr
|
||||||
join member m on m.id = lr.member_id
|
join member m on m.id = lr.member_id
|
||||||
where lr.is_active = true
|
where lr.channel_name is not null
|
||||||
and lr.channel_name is not null
|
|
||||||
and lr.channel_name <> ''
|
and lr.channel_name <> ''
|
||||||
and (:includeAdultActivities = true or lr.is_adult = false)
|
and (:includeAdultActivities = true or lr.is_adult = false)
|
||||||
and m.is_active = true
|
and m.is_active = true
|
||||||
|
|||||||
@@ -437,6 +437,31 @@ class DefaultHomeRecommendationQueryRepositoryTest @Autowired constructor(
|
|||||||
assertEquals(communityCreator.id, byCreatorNickname[communityCreator.nickname]!!.targetId)
|
assertEquals(communityCreator.id, byCreatorNickname[communityCreator.nickname]!!.targetId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("최근 활동 크리에이터는 라이브 활성 여부와 무관하게 채널명이 있는 라이브를 포함한다")
|
||||||
|
fun shouldIncludeInactiveLiveWithChannelNameInRecentlyActiveCreators() {
|
||||||
|
val baseAt = LocalDateTime.of(2026, 5, 31, 10, 0)
|
||||||
|
val inactiveLiveCreator = saveMember("activity-inactive-live", MemberRole.CREATOR)
|
||||||
|
val blankChannelCreator = saveMember("activity-blank-channel", MemberRole.CREATOR)
|
||||||
|
val emptyChannelCreator = saveMember("activity-empty-channel", MemberRole.CREATOR)
|
||||||
|
saveLiveRoom(
|
||||||
|
inactiveLiveCreator,
|
||||||
|
baseAt.plusMinutes(2),
|
||||||
|
channelName = "inactive-live-channel",
|
||||||
|
isActive = false
|
||||||
|
)
|
||||||
|
saveLiveRoom(blankChannelCreator, baseAt.plusMinutes(1), channelName = null, isActive = false)
|
||||||
|
saveLiveRoom(emptyChannelCreator, baseAt, channelName = "", isActive = false)
|
||||||
|
flushAndClear()
|
||||||
|
|
||||||
|
val creators = repository.findRecentlyActiveCreators(limit = 10)
|
||||||
|
|
||||||
|
assertEquals(listOf(inactiveLiveCreator.nickname), creators.map { it.creatorNickname })
|
||||||
|
assertEquals(CreatorActivityType.LIVE, creators.single().activityType)
|
||||||
|
assertEquals(baseAt.plusMinutes(2), creators.single().activityAt)
|
||||||
|
assertEquals(null, creators.single().targetId)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("최근 활동 크리에이터는 성인 노출 정책이 꺼져 있으면 성인 라이브/오디오/커뮤니티 활동을 제외한다")
|
@DisplayName("최근 활동 크리에이터는 성인 노출 정책이 꺼져 있으면 성인 라이브/오디오/커뮤니티 활동을 제외한다")
|
||||||
fun shouldExcludeAdultActivitiesFromRecentlyActiveCreatorsWhenAdultHidden() {
|
fun shouldExcludeAdultActivitiesFromRecentlyActiveCreatorsWhenAdultHidden() {
|
||||||
|
|||||||
Reference in New Issue
Block a user