ios: refresh call invitations and report call on start and activation; core: restore calls on activation (#776)

This commit is contained in:
JRoberts
2022-07-05 15:15:15 +04:00
committed by GitHub
parent 8c307c4675
commit ab848e8c13
13 changed files with 89 additions and 57 deletions
+2 -1
View File
@@ -33,6 +33,7 @@ data Call = Call
callState :: CallState,
callTs :: UTCTime
}
deriving (Show)
isRcvInvitation :: Call -> Bool
isRcvInvitation Call {callState} = case callState of
@@ -88,7 +89,7 @@ data CallState
peerCallSession :: WebRTCSession,
sharedKey :: Maybe C.Key
}
deriving (Generic)
deriving (Show, Generic)
-- database representation
instance FromJSON CallState where
+1
View File
@@ -3693,6 +3693,7 @@ getCalls db User {userId} = do
contact_id, shared_call_id, chat_item_id, call_state, call_ts
FROM calls
WHERE user_id = ?
ORDER BY call_ts ASC
|]
(Only userId)
where