Allow webm stickers in secret chats.
This commit is contained in:
parent
a972252a46
commit
75e5a0b3fe
@ -262,15 +262,9 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
|
||||
mime_type = std::move(document->mime_type_);
|
||||
file_reference = document->file_reference_.as_slice().str();
|
||||
|
||||
if (document_type == Document::Type::Sticker) {
|
||||
if (StickersManager::has_webp_thumbnail(document->thumbs_)) {
|
||||
if (document_type == Document::Type::Sticker && StickersManager::has_webp_thumbnail(document->thumbs_)) {
|
||||
thumbnail_format = PhotoFormat::Webp;
|
||||
}
|
||||
if (mime_type == "video/webm") {
|
||||
sticker_format = StickerFormat::Webm;
|
||||
default_extension = Slice("webm");
|
||||
}
|
||||
}
|
||||
fix_tgs_sticker_type();
|
||||
|
||||
if (owner_dialog_id.get_type() == DialogType::SecretChat) {
|
||||
@ -383,6 +377,10 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
|
||||
// do not allow web TGS stickers
|
||||
// fix_tgs_sticker_type();
|
||||
}
|
||||
if (document_type == Document::Type::Sticker && mime_type == "video/webm") {
|
||||
sticker_format = StickerFormat::Webm;
|
||||
default_extension = Slice("webm");
|
||||
}
|
||||
|
||||
LOG(DEBUG) << "Receive document with ID = " << id << " of type " << document_type;
|
||||
if (!is_web && !DcId::is_valid(dc_id)) {
|
||||
|
Loading…
Reference in New Issue
Block a user