core: compress link data (#5995)

This commit is contained in:
Evgeny
2025-06-18 07:39:31 +01:00
committed by GitHub
parent 94d866e2c0
commit 05dba0bda2
5 changed files with 63 additions and 15 deletions
+4 -3
View File
@@ -109,7 +109,8 @@ defaultChatConfig =
coreApi = False,
highlyAvailable = False,
deviceNameForRemote = "",
chatHooks = defaultChatHooks
chatHooks = defaultChatHooks,
largeLinkData = True
}
logCfg :: LogConfig
@@ -125,7 +126,7 @@ newChatController :: ChatDatabase -> Maybe User -> ChatConfig -> ChatOpts -> Boo
newChatController
ChatDatabase {chatStore, agentStore}
user
cfg@ChatConfig {agentConfig = aCfg, presetServers, inlineFiles, deviceNameForRemote, confirmMigrations}
cfg@ChatConfig {agentConfig = aCfg, presetServers, inlineFiles, deviceNameForRemote, confirmMigrations, largeLinkData}
ChatOpts {coreOptions = CoreChatOpts {smpServers, xftpServers, simpleNetCfg, logLevel, logConnections, logServerHosts, logFile, tbqSize, deviceName, highlyAvailable, yesToUpMigrations}, optFilesFolder, optTempDirectory, showReactions, allowInstantFiles, autoAcceptFileSize}
backgroundMode = do
let inlineFiles' = if allowInstantFiles || autoAcceptFileSize > 0 then inlineFiles else inlineFiles {sendChunks = 0, receiveInstant = False}
@@ -173,7 +174,7 @@ newChatController
tempDirectory <- newTVarIO optTempDirectory
assetsDirectory <- newTVarIO Nothing
contactMergeEnabled <- newTVarIO True
useLargeLinkData <- newTVarIO True
useLargeLinkData <- newTVarIO largeLinkData
pure
ChatController
{ firstTime,