core: do not create decryption error chat items for earlier messages (#2189)

* core: do not create decryption error chat items for earlier messages

* do not report earlier error, mobile items, fix tests
This commit is contained in:
Evgeny Poberezkin
2023-04-16 19:30:25 +02:00
committed by GitHub
parent 393238f47c
commit 5b4c183466
10 changed files with 31 additions and 29 deletions
+1 -5
View File
@@ -735,10 +735,7 @@ data CIContent (d :: MsgDirection) where
deriving instance Show (CIContent d)
data MsgDecryptError
= MDERatchetHeader
| MDEEarlier
| MDETooManySkipped
data MsgDecryptError = MDERatchetHeader | MDETooManySkipped
deriving (Eq, Show, Generic)
instance ToJSON MsgDecryptError where
@@ -954,7 +951,6 @@ msgDecryptErrorText err n =
where
errName = case err of
MDERatchetHeader -> "header"
MDEEarlier -> "earlier message"
MDETooManySkipped -> "too many skipped messages"
msgDirToModeratedContent_ :: SMsgDirection d -> CIContent d