"No file limit" not work
Morb0 opened this issue · 2 comments
Morb0 commented
Hey,
I'm setup local api with docker tdlight/tdlightbotapi:latest
and set TELEGRAM_NO_FILE_LIMIT
env variable.
But then I try to call getFile
in User Mode
i getting "Bad Request: file is too big"
anyway.
With TELEGRAM_LOCAL
that work as expected.
I check condition code from merge request and seem here logical miss:
localMode = false // parameters_->local_mode_
noFileLimit = true // parameters_->no_file_limit_
isBigFile = true // td::max(file->expected_size_, file->local_->downloaded_size_) > MAX_DOWNLOAD_FILE_SIZE
isLimited = (!localMode || !noFileLimit) && isBigFile;
isLimited // -> true
Expected:
localMode = false // parameters_->local_mode_
noFileLimit = true // parameters_->no_file_limit_
isBigFile = true // td::max(file->expected_size_, file->local_->downloaded_size_) > MAX_DOWNLOAD_FILE_SIZE
isLimited = (!localMode && !noFileLimit) && isBigFile;
isLimited // -> false
Morb0 commented
No, I don't think so, this bug is related to these changes.
https://github.com/tdlight-team/tdlight-telegram-bot-api/pull/3/files#diff-74cc224c4335e3aa00be82752a64da6c17519d8c66cbc577321fdc5bd41ca269