From 4ea7fdc562d7cd8f78a9caa822363f423821f6cd Mon Sep 17 00:00:00 2001 From: Klaus Date: Sun, 8 Feb 2026 21:01:53 +0900 Subject: [PATCH] =?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,