mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 04:22:13 +00:00
core: carry ICE restart session in call extra info (#7718)
This commit is contained in:
5 files changed
+21
-2
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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 = "[]"}
|
||||
Reference in new issue
Block a user