Support setting files from secret chats as ringtones.
This commit is contained in:
parent
a16a5ec5e3
commit
497bc9006a
@ -3083,7 +3083,8 @@ Result<FileId> FileManager::check_input_file_id(FileType type, Result<FileId> re
|
||||
if (!is_encrypted && !is_secure) {
|
||||
if (real_type != type && !(real_type == FileType::Temp && file_view.has_url()) &&
|
||||
!(is_document_type(real_type) && is_document_type(type)) &&
|
||||
!(is_background_type(real_type) && is_background_type(type))) {
|
||||
!(is_background_type(real_type) && is_background_type(type)) &&
|
||||
!(file_view.is_encrypted() && type == FileType::Ringtone)) {
|
||||
// TODO: send encrypted file to unencrypted chat
|
||||
return Status::Error(400, "Type of file mismatch");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user