Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deleteSipDispatchRule and TransformCall.clone #87

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/giant-seals-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"server-sdk-kotlin": patch
---

Fix clone function for transformed calls
5 changes: 5 additions & 0 deletions .changeset/gorgeous-knives-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"server-sdk-kotlin": patch
---

Fix deleteSipDispatchRule
9 changes: 9 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Gradle clean
run: ./gradlew clean

- name: Spotless check
if: github.event_name == 'pull_request'
run: |
git fetch origin main --depth 1
./gradlew spotlessCheck

- name: Build with Gradle
run: ./gradlew assemble

Expand Down
4 changes: 1 addition & 3 deletions src/main/kotlin/io/livekit/server/SipService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package io.livekit.server

import com.google.protobuf.Empty
import livekit.LivekitSip
import retrofit2.Call
import retrofit2.http.Body
Expand Down Expand Up @@ -79,7 +78,7 @@ interface SipService {
): Call<LivekitSip.ListSIPDispatchRuleResponse>

@Headers("Content-Type: application/protobuf")
@POST("/twirp/livekit.SIP/CreateSIPDispatchRule")
@POST("/twirp/livekit.SIP/DeleteSIPDispatchRule")
fun deleteSipDispatchRule(
@Body request: LivekitSip.DeleteSIPDispatchRuleRequest,
@Header("Authorization") authorization: String
Expand All @@ -98,5 +97,4 @@ interface SipService {
@Body request: LivekitSip.TransferSIPParticipantRequest,
@Header("Authorization") authorization: String
): Call<Void?>

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import retrofit2.Response
internal class TransformCall<T, R>(private val sourceCall: Call<T>, private val transform: (T) -> R) :
Call<R> {
override fun clone(): Call<R> {
return TransformCall(sourceCall, transform)
return TransformCall(sourceCall.clone(), transform)
}

override fun execute(): Response<R> {
Expand Down
Loading