diff --git a/docs/20260421_라이브방무료여부응답추가.md b/docs/20260421_라이브방무료여부응답추가.md new file mode 100644 index 00000000..6800b8b6 --- /dev/null +++ b/docs/20260421_라이브방무료여부응답추가.md @@ -0,0 +1,12 @@ +# 라이브방 무료 여부 응답 추가 + +- [x] `GetRoomInfoResponse`에 라이브방 무료 여부 필드 추가 +- [x] `GetRoomInfoResponse` 생성 경로에 무료 여부 매핑 반영 +- [x] 관련 검증 수행 및 결과 기록 + +## 검증 기록 + +### 1차 구현 +- 무엇을: `GetRoomInfoResponse`에 `isFreeRoom` 필드를 추가하고, `LiveRoomService`에서 `room.price == 0` 결과를 응답에 매핑했다. +- 왜: 라이브방 정보 응답에서 클라이언트가 무료방 여부를 직접 판별할 수 있어야 하기 때문이다. +- 어떻게: Kotlin `.kt` 파일은 현재 LSP 진단을 지원하지 않아 `lsp_diagnostics` 검증은 불가함을 확인했고, `./gradlew test`를 실행해 main/test 컴파일과 테스트를 함께 검증했으며 `BUILD SUCCESSFUL`을 확인했다. 로컬 실행 환경이 이 세션에 준비되지 않아 실제 API 호출 기반 수동 QA는 수행하지 못했다. diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt index 92eac271..c724cbaa 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt @@ -1076,6 +1076,7 @@ class LiveRoomService( donationRankingTop3UserIds = donationRankingTop3UserIds, menuPan = menuPan?.menu ?: "", creatorLanguageCode = creatorLanguageCode, + isFreeRoom = room.price == 0, isPrivateRoom = room.type == LiveRoomType.PRIVATE, password = room.password, isActiveRoulette = isActiveRoulette, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/info/GetRoomInfoResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/info/GetRoomInfoResponse.kt index b968ff49..2225346f 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/info/GetRoomInfoResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/info/GetRoomInfoResponse.kt @@ -23,6 +23,7 @@ data class GetRoomInfoResponse( val donationRankingTop3UserIds: List, val menuPan: String, val creatorLanguageCode: String?, + val isFreeRoom: Boolean, val isPrivateRoom: Boolean = false, val password: String? = null, val isActiveRoulette: Boolean = false,