From 4ea7fdc562d7cd8f78a9caa822363f423821f6cd Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 8 Feb 2026 21:01:53 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EB=B0=A9=20=EC=A0=95=EB=B3=B4=20=EC=9D=91?= =?UTF-8?q?=EB=8B=B5=EC=9D=98=20v2v=20=EC=9B=8C=EC=BB=A4=20=ED=86=A0?= =?UTF-8?q?=ED=81=B0=EC=9D=84=20RTC=EB=A1=9C=20=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GetRoomInfoResponse의 v2vWorkerRtmToken 필드를 v2vWorkerToken으로 변경한다. v2v 워커 토큰은 RTM 대신 채널 기반 RTC 토큰을 반환한다. --- .../kr/co/vividnext/sodalive/agora/RtcTokenBuilder.kt | 5 ++--- .../co/vividnext/sodalive/live/room/LiveRoomService.kt | 9 +++++---- .../sodalive/live/room/info/GetRoomInfoResponse.kt | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/agora/RtcTokenBuilder.kt b/src/main/kotlin/kr/co/vividnext/sodalive/agora/RtcTokenBuilder.kt index c5b16771..76bc4955 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/agora/RtcTokenBuilder.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/agora/RtcTokenBuilder.kt @@ -34,15 +34,14 @@ class RtcTokenBuilder { appId: String, appCertificate: String, channelName: String, - uid: Int, + uid: String, privilegeTs: Int ): String { - val account = if (uid == 0) "" else uid.toString() return buildTokenWithUserAccount( appId, appCertificate, channelName, - account, + uid, privilegeTs ) } 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 74cf8fa6..31da8afa 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 @@ -917,7 +917,7 @@ class LiveRoomService( agoraAppId, agoraAppCertificate, room.channelName!!, - member.id!!.toInt(), + member.id!!.toString(), expireTimestamp.toInt() ) @@ -928,10 +928,11 @@ class LiveRoomService( expireTimestamp.toInt() ) - val v2vWorkerRtmToken = rtmTokenBuilder.buildToken( + val v2vWorkerToken = rtcTokenBuilder.buildTokenWithUid( agoraAppId, agoraAppCertificate, - "v2v-agent-${member.id!!}", + room.channelName!!, + "${member.id!!}333", expireTimestamp.toInt() ) @@ -989,7 +990,7 @@ class LiveRoomService( channelName = room.channelName!!, rtcToken = rtcToken, rtmToken = rtmToken, - v2vWorkerRtmToken = v2vWorkerRtmToken, + v2vWorkerToken = v2vWorkerToken, creatorId = room.member!!.id!!, creatorNickname = room.member!!.nickname, creatorProfileUrl = if (room.member!!.profileImage != null) { 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 b455b6ec..37eee7df 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 @@ -8,7 +8,7 @@ data class GetRoomInfoResponse( val channelName: String, val rtcToken: String, val rtmToken: String, - val v2vWorkerRtmToken: String, + val v2vWorkerToken: String, val creatorId: Long, val creatorNickname: String, val creatorProfileUrl: String, From 8dec0fe2e5eef81abebb98c1f9b5b5308a279138 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 8 Feb 2026 22:18:50 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=96=B8?= =?UTF-8?q?=EC=96=B4=20=ED=83=9C=EA=B7=B8=EB=A5=BC=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=96=B8=EC=96=B4=EB=A1=9C=20=EB=B2=88=EC=97=AD=ED=95=B4=20?= =?UTF-8?q?=EB=85=B8=EC=B6=9C=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 라이브 목록/상세 응답의 언어 태그를 조회자 언어로 반환한다. 언어 코드를 메시지 키로 매핑해 ko/en/ja 번역값을 제공한다. --- .../sodalive/i18n/SodaMessageSource.kt | 15 +++++++++++ .../sodalive/live/room/LiveRoomService.kt | 26 +++++++++---------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt b/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt index 7f8e3c5e..8e78ce2d 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt @@ -1578,6 +1578,21 @@ class SodaMessageSource { Lang.EN to "yyyy.MM.dd E hh:mm a", Lang.JA to "yyyy.MM.dd E hh:mm a" ), + "live.room.language_tag.korean" to mapOf( + Lang.KO to "한국어", + Lang.EN to "Korean", + Lang.JA to "韓国語" + ), + "live.room.language_tag.japanese" to mapOf( + Lang.KO to "일본어", + Lang.EN to "Japanese", + Lang.JA to "日本語" + ), + "live.room.language_tag.english" to mapOf( + Lang.KO to "영어", + Lang.EN to "English", + Lang.JA to "英語" + ), "live.room.fcm.message.started" to mapOf( Lang.KO to "라이브를 시작했습니다. - %s", Lang.EN to "Live started. - %s", 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 31da8afa..75e0bb5c 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 @@ -154,13 +154,7 @@ class LiveRoomService( .maxByOrNull { it.updatedAt ?: LocalDateTime.MIN } ?.languageCode - val languageTag = when (languageCode?.lowercase()?.take(2)) { - "ko" -> "한국어" - "ja" -> "일본어" - "en" -> "영어" - else -> null - } - return languageTag + return resolveLanguageTag(languageCode) } private fun buildLanguageTagMap(memberIds: List): Map { @@ -175,15 +169,21 @@ class LiveRoomService( } return latestTokenByMemberId.mapValues { (_, token) -> - when (token?.languageCode?.lowercase()?.take(2)) { - "ko" -> "한국어" - "ja" -> "일본어" - "en" -> "영어" - else -> null - } + resolveLanguageTag(token?.languageCode) } } + private fun resolveLanguageTag(languageCode: String?): String? { + val key = when (languageCode?.lowercase()?.take(2)) { + "ko" -> "live.room.language_tag.korean" + "ja" -> "live.room.language_tag.japanese" + "en" -> "live.room.language_tag.english" + else -> null + } ?: return null + + return messageSource.getMessage(key, langContext.lang) + } + @Transactional(readOnly = true) fun getRoomList( dateString: String?, From 7afbf1bff8236e7be3d0e2a672d0eff92c322ed9 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 8 Feb 2026 22:26:34 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=B0=A9=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=9D=91=EB=8B=B5=EC=97=90=20=EB=B0=A9?= =?UTF-8?q?=EC=9E=A5=20=EC=96=B8=EC=96=B4=EC=BD=94=EB=93=9C=EB=A5=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B3=B5=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 라이브방 정보 조회 응답에서 tags 필드를 제거한다. 방장이 설정한 언어를 2자리 creatorLanguageCode로 제공한다. --- .../sodalive/live/room/LiveRoomService.kt | 14 +++++++------- .../sodalive/live/room/info/GetRoomInfoResponse.kt | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) 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 75e0bb5c..60653ff1 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 @@ -963,12 +963,12 @@ class LiveRoomService( } val menuPan = menuService.getLiveMenu(creatorId = room.member!!.id!!) - val languageTagByMemberId = buildLanguageTagMap(listOfNotNull(room.member?.id)) - - val tags = room.tags - .filter { it.tag.isActive } - .map { it.tag.tag } - .let { tags -> applyLanguageTagToRoomTags(room.member?.id, tags, languageTagByMemberId) } + val creatorLanguageCode = pushTokenRepository.findByMemberId(room.member!!.id!!) + .filterNot { it.languageCode.isNullOrBlank() } + .maxByOrNull { it.updatedAt ?: LocalDateTime.MIN } + ?.languageCode + ?.lowercase() + ?.take(2) return GetRoomInfoResponse( roomId = roomId, @@ -1007,7 +1007,7 @@ class LiveRoomService( managerList = roomInfo.managerList, donationRankingTop3UserIds = donationRankingTop3UserIds, menuPan = menuPan?.menu ?: "", - tags = tags, + creatorLanguageCode = creatorLanguageCode, 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 37eee7df..f7c6d743 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 @@ -21,7 +21,7 @@ data class GetRoomInfoResponse( val managerList: List, val donationRankingTop3UserIds: List, val menuPan: String, - val tags: List, + val creatorLanguageCode: String?, val isPrivateRoom: Boolean = false, val password: String? = null, val isActiveRoulette: Boolean = false