From 0bf12f80558179679302f472eece02caef7b0591 Mon Sep 17 00:00:00 2001 From: davidliu Date: Wed, 19 Jun 2024 16:34:16 +0900 Subject: [PATCH] Add topic field to RoomServiceClient.sendData --- src/main/kotlin/io/livekit/server/RoomServiceClient.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/io/livekit/server/RoomServiceClient.kt b/src/main/kotlin/io/livekit/server/RoomServiceClient.kt index 25b5d66..151b1d2 100644 --- a/src/main/kotlin/io/livekit/server/RoomServiceClient.kt +++ b/src/main/kotlin/io/livekit/server/RoomServiceClient.kt @@ -290,6 +290,7 @@ class RoomServiceClient( kind: LivekitModels.DataPacket.Kind, destinationSids: List = emptyList(), destinationIdentities: List = emptyList(), + topic: String? = null, ): Call { val request = with(LivekitRoom.SendDataRequest.newBuilder()) { this.room = roomName @@ -297,6 +298,9 @@ class RoomServiceClient( this.kind = kind addAllDestinationSids(destinationSids) addAllDestinationIdentities(destinationIdentities) + if (topic != null) { + this.topic = topic + } build() }