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:
Evgeny Poberezkin
2022-11-26 22:39:56 +00:00
committed by GitHub
parent ade8c97b16
commit 7f0355ec67
9 changed files with 98 additions and 58 deletions
+5 -2
View File
@@ -81,7 +81,8 @@ data InlineFilesConfig = InlineFilesConfig
{ offerChunks :: Integer,
sendChunks :: Integer,
totalSendChunks :: Integer,
receiveChunks :: Integer
receiveChunks :: Integer,
receiveInstant :: Bool
}
defaultInlineFilesConfig :: InlineFilesConfig
@@ -90,7 +91,8 @@ defaultInlineFilesConfig =
{ offerChunks = 15, -- max when chunks are offered / received with the option - limited to 255 on the encoding level
sendChunks = 6, -- max per file when chunks will be sent inline without acceptance
totalSendChunks = 30, -- max per conversation when chunks will be sent inline without acceptance
receiveChunks = 8 -- max when chunks are accepted
receiveChunks = 8, -- max when chunks are accepted
receiveInstant = True -- allow receiving instant files, within receiveChunks limit
}
data ActiveTo = ActiveNone | ActiveC ContactName | ActiveG GroupName
@@ -534,6 +536,7 @@ data ChatErrorType
| CEFileImageType {filePath :: FilePath}
| CEFileImageSize {filePath :: FilePath}
| CEFileNotReceived {fileId :: FileTransferId}
| CEFileLargeSentInline {fileId :: FileTransferId}
| CEInvalidQuote
| CEInvalidChatItemUpdate
| CEInvalidChatItemDelete