mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 12:42:28 +00:00
EncodedChatMessage type
This commit is contained in:
1 parent
2944c1cc28
commit
106916fd29
8 files changed
+25
-26
No files matched your search
@@ -73,10 +73,10 @@ s ==## msg = do
|
||||
s ##== msg = do
|
||||
let r = encodeChatMessage msg
|
||||
case r of
|
||||
Left e -> expectationFailure $ "encode error: " <> show e
|
||||
Right encodedBody ->
|
||||
ECMEncoded encodedBody ->
|
||||
J.eitherDecodeStrict' (LB.toStrict encodedBody)
|
||||
`shouldBe` (J.eitherDecodeStrict' s :: Either String J.Value)
|
||||
ECMLarge -> expectationFailure $ "large message"
|
||||
|
||||
(##==##) :: MsgEncodingI e => ByteString -> ChatMessage e -> Expectation
|
||||
s ##==## msg = do
|
||||
|
||||
Reference in new issue
Block a user