mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Fix local thumbnail saving for stickers.
This commit is contained in:
parent
10ee81f466
commit
d479442a63
1 changed files with 7 additions and 2 deletions
|
@ -2328,15 +2328,20 @@ not_null<DocumentData*> Session::processDocument(
|
|||
|
||||
case mtpc_document: {
|
||||
const auto &fields = data.c_document();
|
||||
const auto mime = qs(fields.vmime_type);
|
||||
const auto format = (mime == qstr("image/webp")
|
||||
|| mime == qstr("application/x-tgsticker"))
|
||||
? "WEBP"
|
||||
: "JPG";
|
||||
return document(
|
||||
fields.vid.v,
|
||||
fields.vaccess_hash.v,
|
||||
fields.vfile_reference.v,
|
||||
fields.vdate.v,
|
||||
fields.vattributes.v,
|
||||
qs(fields.vmime_type),
|
||||
mime,
|
||||
ImagePtr(),
|
||||
Images::Create(std::move(thumb), "JPG"),
|
||||
Images::Create(std::move(thumb), format),
|
||||
fields.vdc_id.v,
|
||||
fields.vsize.v,
|
||||
StorageImageLocation());
|
||||
|
|
Loading…
Add table
Reference in a new issue