mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
core: only send voice messages without acceptance (#1444)
* core: only send voice messages without acceptance * remove some unnecessary changes * update * refactor receiveInlineMode
This commit is contained in:
committed by
GitHub
parent
ade8c97b16
commit
7f0355ec67
@@ -265,6 +265,7 @@ cmToQuotedMsg = \case
|
||||
_ -> Nothing
|
||||
|
||||
data MsgContentTag = MCText_ | MCLink_ | MCImage_ | MCVoice_ | MCFile_ | MCUnknown_ Text
|
||||
deriving (Eq)
|
||||
|
||||
instance StrEncoding MsgContentTag where
|
||||
strEncode = \case
|
||||
@@ -341,6 +342,11 @@ durationText duration =
|
||||
| n <= 9 = '0' : show n
|
||||
| otherwise = show n
|
||||
|
||||
isVoice :: MsgContent -> Bool
|
||||
isVoice = \case
|
||||
MCVoice {} -> True
|
||||
_ -> False
|
||||
|
||||
msgContentTag :: MsgContent -> MsgContentTag
|
||||
msgContentTag = \case
|
||||
MCText _ -> MCText_
|
||||
|
||||
Reference in New Issue
Block a user