core: delete previous contact calls when receiving a new one (#1812)

This commit is contained in:
JRoberts authored and GitHub committed 2023-01-21 16:40:24 +04:00
1 parent e72d4638d2
commit c337a6888d
1 file changed
+2 -1
+2 -1
View File
@@ -4579,8 +4579,9 @@ overwriteSMPServers db User {userId} servers =
pure $ Right ()
createCall :: DB.Connection -> User -> Call -> UTCTime -> IO ()
createCall db User {userId} Call {contactId, callId, chatItemId, callState} callTs = do
createCall db user@User {userId} Call {contactId, callId, chatItemId, callState} callTs = do
currentTs <- getCurrentTime
deleteCalls db user contactId
DB.execute
db
[sql|