core: carry ICE restart session in call extra info (#7718)

This commit is contained in:
sh authored and GitHub committed 2026-10-19 12:22:10 +01:00
1 parent 2ea1ec0d50
commit 58bc94bc74
5 files changed
+21 -2

No files matched your search

+7
View File
@@ -1362,6 +1362,13 @@ testNegotiateCall =
bob <## "ok"
threadDelay 100000
bob #$> ("/_get chat @2 count=100", callChat, chatFeatures <> [(0, "incoming call: in progress")])
-- either party can restart ICE of a connected call
bob ##> "/_call extra @2 {\"rtcSession\":\"{}\",\"rtcIceCandidates\":\"[]\"}"
bob <## "ok"
alice <## "call extra info from bob"
alice ##> "/_call extra @2 {\"rtcSession\":\"{}\",\"rtcIceCandidates\":\"[]\"}"
alice <## "ok"
bob <## "call extra info from alice"
-- either party can end the call
bob ##> "/_call end @2"
bob <## "ok"
+6
View File
@@ -433,5 +433,11 @@ decodeChatMessageTest = describe "Chat message encoding/decoding" $ do
it "x.call.offer with call version" $
"{\"v\":\"9\",\"event\":\"x.call.offer\",\"params\":{\"callId\":\"AQIDBA==\",\"offer\":{\"callType\":{\"media\":\"video\",\"capabilities\":{\"encryption\":true}},\"rtcSession\":{\"rtcSession\":\"{}\",\"rtcIceCandidates\":\"[]\"},\"callVersion\":2}}}"
#==# XCallOffer (CallId "\1\2\3\4") CallOffer {callType = defaultCallType, rtcSession = testRTCSession, callDhPubKey = Nothing, callVersion = Just $ VersionCall 2}
it "x.call.extra without session" $
"{\"v\":\"9\",\"event\":\"x.call.extra\",\"params\":{\"callId\":\"AQIDBA==\",\"extra\":{\"rtcExtraInfo\":{\"rtcIceCandidates\":\"[]\"}}}}"
#==# XCallExtra (CallId "\1\2\3\4") CallExtraInfo {rtcExtraInfo = WebRTCExtraInfo {rtcSession = Nothing, rtcIceCandidates = "[]"}}
it "x.call.extra with ICE restart session" $
"{\"v\":\"9\",\"event\":\"x.call.extra\",\"params\":{\"callId\":\"AQIDBA==\",\"extra\":{\"rtcExtraInfo\":{\"rtcSession\":\"{}\",\"rtcIceCandidates\":\"[]\"}}}}"
#==# XCallExtra (CallId "\1\2\3\4") CallExtraInfo {rtcExtraInfo = WebRTCExtraInfo {rtcSession = Just "{}", rtcIceCandidates = "[]"}}
where
testRTCSession = WebRTCSession {rtcSession = "{}", rtcIceCandidates = "[]"}