2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Add .jpg to inputFile filename when photo is sent.

Server has some extensions checking for inputMediaUploadedPhoto,
so force the extension to be .jpg anyway. It doesn't matter,
because the filename from inputFile is not used anywhere.

Also own PhotoData::UploadingData through std::unique_ptr.
This commit is contained in:
John Preston
2017-03-10 18:45:22 +03:00
parent f6918feea3
commit 021454dbd4
6 changed files with 26 additions and 28 deletions

View File

@@ -314,7 +314,7 @@ bool FileLoadTask::CheckForImage(const QString &filepath, const QByteArray &cont
}
void FileLoadTask::process() {
const QString stickerMime = qsl("image/webp");
const auto stickerMime = qsl("image/webp");
_result = MakeShared<FileLoadResult>(_id, _to, _caption);
@@ -323,7 +323,7 @@ void FileLoadTask::process() {
QByteArray filedata;
uint64 thumbId = 0;
QString thumbname = "thumb.jpg";
auto thumbname = qsl("thumb.jpg");
QByteArray thumbdata;
auto isAnimation = false;