webrtc: show connection information, mark call as missed if it ends while pending (#672)

This commit is contained in:
Evgeny Poberezkin
2022-05-20 07:43:44 +01:00
committed by GitHub
parent d50ebbd061
commit 9c9f6d8443
10 changed files with 101 additions and 50 deletions
+1
View File
@@ -848,6 +848,7 @@ callStatusItemContent userId Contact {contactId} chatItemId receivedStatus = do
(Just CISCallProgress, WCSConnected) -> Nothing -- if call in-progress received connected -> no change
(Just CISCallProgress, WCSDisconnected) -> Just (CISCallEnded, callDuration) -- calculate in-progress duration
(Just CISCallProgress, WCSFailed) -> Just (CISCallEnded, callDuration) -- whether call disconnected or failed
(Just CISCallPending, WCSDisconnected) -> Just (CISCallMissed, 0)
(Just CISCallEnded, _) -> Nothing -- if call already ended or failed -> no change
(Just CISCallError, _) -> Nothing
(Just _, WCSConnected) -> Just (CISCallProgress, 0) -- if call ended that was never connected, duration = 0