mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-03 09:02:53 +01:00
Merge pull request #83 from a5r0n/fix/no-file-limit
fix no_file_limit typo
This commit is contained in:
commit
b3eb1acc91
@ -5572,7 +5572,7 @@ void Client::on_update_file(object_ptr<td_api::file> file) {
|
||||
if (!is_file_being_downloaded(file_id)) {
|
||||
return;
|
||||
}
|
||||
if ((!parameters_->local_mode_ || !parameters_->no_file_limit_) && file->local_->downloaded_size_ > MAX_DOWNLOAD_FILE_SIZE) {
|
||||
if ((!parameters_->local_mode_ && !parameters_->no_file_limit_) && file->local_->downloaded_size_ > MAX_DOWNLOAD_FILE_SIZE) {
|
||||
if (file->local_->is_downloading_active_) {
|
||||
send_request(make_object<td_api::cancelDownloadFile>(file_id, false),
|
||||
td::make_unique<TdOnCancelDownloadFileCallback>());
|
||||
@ -11099,7 +11099,7 @@ void Client::process_register_user_query(PromisedQueryPtr &query) {
|
||||
//end custom auth methods impl
|
||||
|
||||
void Client::do_get_file(object_ptr<td_api::file> file, PromisedQueryPtr query) {
|
||||
if ((!parameters_->local_mode_ || !parameters_->no_file_limit_) &&
|
||||
if ((!parameters_->local_mode_ && !parameters_->no_file_limit_) &&
|
||||
td::max(file->expected_size_, file->local_->downloaded_size_) > MAX_DOWNLOAD_FILE_SIZE) { // speculative check
|
||||
return fail_query(400, "Bad Request: file is too big", std::move(query));
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ struct ClientParameters {
|
||||
bool local_mode_ = false;
|
||||
bool allow_http_ = false;
|
||||
bool use_relative_path_ = false;
|
||||
bool no_file_limit_ = true;
|
||||
bool no_file_limit_ = false;
|
||||
bool allow_users_ = false;
|
||||
bool allow_users_registration_ = false;
|
||||
bool stats_hide_sensible_data_ = false;
|
||||
|
Loading…
Reference in New Issue
Block a user