Skip to content

Commit

Permalink
Add topic field to RoomServiceClient.sendData (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu authored Jun 19, 2024
1 parent 55cb331 commit 371ffb4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/kotlin/io/livekit/server/RoomServiceClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,17 @@ class RoomServiceClient(
kind: LivekitModels.DataPacket.Kind,
destinationSids: List<String> = emptyList(),
destinationIdentities: List<String> = emptyList(),
topic: String? = null,
): Call<Void> {
val request = with(LivekitRoom.SendDataRequest.newBuilder()) {
this.room = roomName
this.data = ByteString.copyFrom(data)
this.kind = kind
addAllDestinationSids(destinationSids)
addAllDestinationIdentities(destinationIdentities)
if (topic != null) {
this.topic = topic
}
build()
}

Expand Down

0 comments on commit 371ffb4

Please sign in to comment.