Skip to content

Commit

Permalink
Fix creation of WEBM documents.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Jan 31, 2022
1 parent e503195 commit d5d6e52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion td/telegram/StickersManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5594,10 +5594,12 @@ Result<std::tuple<FileId, bool, bool, StickerFormat>> StickersManager::prepare_i
return std::make_tuple(FileId(), false, false, StickerFormat::Unknown);
}

if (file_type == FileType::Sticker) {
if (format == StickerFormat::Tgs) {
int32 width = for_thumbnail ? 100 : 512;
create_sticker(file_id, string(), PhotoSize(), get_dimensions(width, width, "prepare_input_file"), nullptr, format,
nullptr);
} else if (format == StickerFormat::Webm) {
td_->documents_manager_->create_document(file_id, string(), PhotoSize(), "sticker.webm", "video/webm", false);
} else {
td_->documents_manager_->create_document(file_id, string(), PhotoSize(), "sticker.png", "image/png", false);
}
Expand Down

0 comments on commit d5d6e52

Please sign in to comment.