Skip to content

Commit ba637f8

Browse files
committed
fix(voip): add missing RNCallKeep.endCall on user hangup before answer
When the user ended an incoming call before it connected, handleObservedCallChanged sent the REST reject but never notified CallKit to remove the call from the system Recents UI. Also deduplicate MediaCallsAnswerResponse with MessageResponse.
1 parent 4b43763 commit ba637f8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

ios/Libraries/VoipService.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,11 +595,12 @@ public final class VoipService: NSObject {
595595
return
596596
}
597597

598+
let endedCallId = observedCall.payload.callId
598599
observedIncomingCalls.removeValue(forKey: call.uuid)
599-
cancelIncomingCallTimeout(for: observedCall.payload.callId)
600-
clearNativeAcceptDedupe(for: observedCall.payload.callId)
600+
cancelIncomingCallTimeout(for: endedCallId)
601+
clearNativeAcceptDedupe(for: endedCallId)
601602

602-
let endedCallId = observedCall.payload.callId
603+
RNCallKeep.endCall(withUUID: endedCallId, reason: 3)
603604
reject(payload: observedCall.payload)
604605
}
605606
}

ios/Shared/RocketChat/API/MediaCallsAnswerRequest.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,4 @@ struct MediaCallsAnswerRequest: Request {
3838
}
3939
}
4040

41-
struct MediaCallsAnswerResponse: Response {
42-
let success: Bool
43-
}
41+
typealias MediaCallsAnswerResponse = MessageResponse

0 commit comments

Comments
 (0)