From c4bc4ef7d19894a486fc78d85629e4c3cfa8599b Mon Sep 17 00:00:00 2001 From: OrangeRoll Date: Fri, 7 Aug 2026 14:18:08 +0800 Subject: [PATCH] =?UTF-8?q?tag(=E5=8A=9F=E8=83=BD):=E5=90=8C=E4=B8=80?= =?UTF-8?q?=E5=B8=90=E5=8F=B7=E5=8F=AF=E4=BB=A5=E5=A4=9A=E5=A4=84=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ScreenShareApi/src/main/kotlin/Routing.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/ScreenShareApi/src/main/kotlin/Routing.kt b/apps/ScreenShareApi/src/main/kotlin/Routing.kt index 7ff9288..c606441 100644 --- a/apps/ScreenShareApi/src/main/kotlin/Routing.kt +++ b/apps/ScreenShareApi/src/main/kotlin/Routing.kt @@ -151,16 +151,17 @@ fun Application.configureRouting() { val membership = RoomRepository.member(room.id, user.id) ?: throw ApiException("请先加入房间", 403) val liveKit = liveKitSettings() + val participantIdentity = user.id.toString() + "-" + UUID.randomUUID() val token = LiveKitTokenIssuer(liveKit.apiKey, liveKit.apiSecret).issue( roomName = room.id.toString(), - identity = user.id.toString(), + identity = participantIdentity, participantName = user.displayName, role = membership.role, ) call.respond( TokenResponse( roomName = room.id.toString(), - participantIdentity = user.id.toString(), + participantIdentity = participantIdentity, participantName = user.displayName, livekitUrl = liveKit.publicUrl, token = token,