2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Send PDFs only as files.

Fixes #10294.
This commit is contained in:
John Preston
2021-02-05 13:17:26 +04:00
parent e8affa85b0
commit ce1b94eb16
2 changed files with 3 additions and 2 deletions

View File

@@ -875,7 +875,8 @@ void FileLoadTask::process(Args &&args) {
}
} else if (isAnimation) {
attributes.push_back(MTP_documentAttributeAnimated());
} else if (_type != SendMediaType::File) {
} else if (filemime.startsWith(u"image/"_q)
&& _type != SendMediaType::File) {
auto medium = (w > 320 || h > 320) ? fullimage.scaled(320, 320, Qt::KeepAspectRatio, Qt::SmoothTransformation) : fullimage;
auto full = (w > 1280 || h > 1280) ? fullimage.scaled(1280, 1280, Qt::KeepAspectRatio, Qt::SmoothTransformation) : fullimage;
{