core: catch errors on archive import (#2486)

* core: catch errors on archive import

* return list

* refactor

* rename

* rename

* refactor

* Update src/Simplex/Chat/Archive.hs

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>

* fix syntax

* refactor

* CRArchiveImported

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
spaced4ndy
2023-05-23 13:51:23 +04:00
committed by GitHub
parent e65dcf51b0
commit bcbfc1758e
4 changed files with 34 additions and 19 deletions

View File

@@ -524,6 +524,7 @@ data ChatResponse
| CRMessageError {user :: User, severity :: Text, errorMessage :: Text}
| CRChatCmdError {user_ :: Maybe User, chatError :: ChatError}
| CRChatError {user_ :: Maybe User, chatError :: ChatError}
| CRArchiveImported {fileErrors :: [(Maybe String, ChatError)]}
| CRTimedAction {action :: String, durationMilliseconds :: Int64}
deriving (Show, Generic)