support for unknown message content types (#395)

* android: parse/serialize unknown chat items

* ios: more resilient decoding of MsgContent

* core: preserve JSON of unknown message content type in MCUknown, so it can be parsed once it is supported by the client
This commit is contained in:
Evgeny Poberezkin
2022-03-03 08:32:25 +00:00
committed by GitHub
parent b10b3a3434
commit c47a7d78fe
5 changed files with 72 additions and 29 deletions
+1 -1
View File
@@ -371,7 +371,7 @@ ttyMsgTime = styleTime . formatTime defaultTimeLocale "%H:%M"
ttyMsgContent :: MsgContent -> [StyledString]
ttyMsgContent = \case
MCText t -> msgPlain t
MCUnknown -> ["unknown message type"]
MCUnknown _ t -> msgPlain t
ttySentFile :: StyledString -> FileTransferId -> FilePath -> [StyledString]
ttySentFile to fId fPath = ["/f " <> to <> ttyFilePath fPath, "use " <> highlight ("/fc " <> show fId) <> " to cancel sending"]