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

Added ability to send webp as compressed image.

This commit is contained in:
23rd
2022-11-10 18:34:37 +03:00
committed by John Preston
parent 57c50c8655
commit 3467fe226f
12 changed files with 161 additions and 45 deletions

View File

@@ -3374,7 +3374,10 @@ void ApiWrap::sendFiles(
std::shared_ptr<SendingAlbum> album,
const SendAction &action) {
const auto haveCaption = !caption.text.isEmpty();
if (haveCaption && !list.canAddCaption(album != nullptr)) {
if (haveCaption
&& !list.canAddCaption(
album != nullptr,
type == SendMediaType::Photo)) {
auto message = MessageToSend(action);
message.textWithTags = base::take(caption);
message.action.clearDraft = false;