core: process ERR response to async command (#1061)

This commit is contained in:
JRoberts authored and GitHub committed 2022-09-16 19:30:02 +04:00
1 parent d5b9f4014e
commit e8c14896aa
5 files changed
+39 -13

No files matched your search

+5
View File
@@ -179,6 +179,7 @@ module Simplex.Chat.Store
getCalls,
createCommand,
setCommandConnId,
deleteCommand,
updateCommandStatus,
getCommandDataByCorrId,
setConnConnReqInv,
@@ -3919,6 +3920,10 @@ setCommandConnId db User {userId} cmdId connId = do
|]
(connId, updatedAt, userId, cmdId)
deleteCommand :: DB.Connection -> User -> CommandId -> IO ()
deleteCommand db User {userId} cmdId =
DB.execute db "DELETE FROM commands WHERE user_id = ? AND command_id = ?" (userId, cmdId)
updateCommandStatus :: DB.Connection -> User -> CommandId -> CommandStatus -> IO ()
updateCommandStatus db User {userId} cmdId status = do
updatedAt <- getCurrentTime