Add ignore_inline_thumbnails option.
GitOrigin-RevId: 5721f8d0fd0a0adc3ba2c65c1c4af35690bdf47a
This commit is contained in:
parent
231c00ed9f
commit
45af3f53db
@ -6681,6 +6681,9 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
if (set_boolean_option("ignore_inline_thumbnails")) {
|
||||
return;
|
||||
}
|
||||
if (set_boolean_option("is_emulator")) {
|
||||
return;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "td/telegram/telegram_api.h"
|
||||
|
||||
#include "td/telegram/ConfigShared.h"
|
||||
#include "td/telegram/files/FileLoaderUtils.h"
|
||||
#include "td/telegram/files/FileLocation.h"
|
||||
#include "td/telegram/Global.h"
|
||||
@ -1335,6 +1336,10 @@ bool FileManager::set_encryption_key(FileId file_id, FileEncryptionKey key) {
|
||||
}
|
||||
|
||||
bool FileManager::set_content(FileId file_id, BufferSlice bytes) {
|
||||
if (G()->shared_config().get_option_boolean("ignore_inline_thumbnails")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto node = get_sync_file_node(file_id);
|
||||
if (!node) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user