Skip to content

Commit 669ebe8

Browse files
authored
Fix deleteSipDispatchRule and TransformCall.clone (#87)
* Fix deleteSipDispatchRule and TransformCall.clone * changeset * Add spotlessCheck to CI
1 parent 9d06d5b commit 669ebe8

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

.changeset/giant-seals-compete.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"server-sdk-kotlin": patch
3+
---
4+
5+
Fix clone function for transformed calls

.changeset/gorgeous-knives-bow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"server-sdk-kotlin": patch
3+
---
4+
5+
Fix deleteSipDispatchRule

.github/workflows/CI.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ jobs:
4545
- name: Grant execute permission for gradlew
4646
run: chmod +x gradlew
4747

48+
- name: Gradle clean
49+
run: ./gradlew clean
50+
51+
- name: Spotless check
52+
if: github.event_name == 'pull_request'
53+
run: |
54+
git fetch origin main --depth 1
55+
./gradlew spotlessCheck
56+
4857
- name: Build with Gradle
4958
run: ./gradlew assemble
5059

src/main/kotlin/io/livekit/server/SipService.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package io.livekit.server
1818

19-
import com.google.protobuf.Empty
2019
import livekit.LivekitSip
2120
import retrofit2.Call
2221
import retrofit2.http.Body
@@ -79,7 +78,7 @@ interface SipService {
7978
): Call<LivekitSip.ListSIPDispatchRuleResponse>
8079

8180
@Headers("Content-Type: application/protobuf")
82-
@POST("/twirp/livekit.SIP/CreateSIPDispatchRule")
81+
@POST("/twirp/livekit.SIP/DeleteSIPDispatchRule")
8382
fun deleteSipDispatchRule(
8483
@Body request: LivekitSip.DeleteSIPDispatchRuleRequest,
8584
@Header("Authorization") authorization: String
@@ -98,5 +97,4 @@ interface SipService {
9897
@Body request: LivekitSip.TransferSIPParticipantRequest,
9998
@Header("Authorization") authorization: String
10099
): Call<Void?>
101-
102100
}

src/main/kotlin/io/livekit/server/retrofit/TransformCall.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import retrofit2.Response
2828
internal class TransformCall<T, R>(private val sourceCall: Call<T>, private val transform: (T) -> R) :
2929
Call<R> {
3030
override fun clone(): Call<R> {
31-
return TransformCall(sourceCall, transform)
31+
return TransformCall(sourceCall.clone(), transform)
3232
}
3333

3434
override fun execute(): Response<R> {

0 commit comments

Comments
 (0)