core: sending messages with files (#507)

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
JRoberts
2022-04-10 13:30:58 +04:00
committed by GitHub
parent 150b4196ea
commit 13f84f2a96
14 changed files with 670 additions and 297 deletions
+6 -6
View File
@@ -112,7 +112,7 @@ data ChatMsgEvent
| XMsgUpdate SharedMsgId MsgContent
| XMsgDel SharedMsgId
| XMsgDeleted
| XFile FileInvitation
| XFile FileInvitation -- TODO discontinue
| XFileAcpt String -- old file protocol
| XFileAcptInv SharedMsgId ConnReqInvitation String -- new file protocol
| XInfo Profile
@@ -176,11 +176,11 @@ data MsgContainer
| MCForward ExtMsgContent
deriving (Eq, Show)
mcContent :: MsgContainer -> MsgContent
mcContent = \case
MCSimple (ExtMsgContent c _) -> c
MCQuote _ (ExtMsgContent c _) -> c
MCForward (ExtMsgContent c _) -> c
mcExtMsgContent :: MsgContainer -> ExtMsgContent
mcExtMsgContent = \case
MCSimple c -> c
MCQuote _ c -> c
MCForward c -> c
data LinkPreview = LinkPreview {uri :: Text, title :: Text, description :: Text, image :: ImageData}
deriving (Eq, Show, Generic)