mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Fixed caption when sending single WEBP as file.
This commit is contained in:
parent
ef1d38462f
commit
d1a9f1feac
1 changed files with 8 additions and 1 deletions
|
@ -4302,7 +4302,14 @@ void ApiWrap::sendFiles(
|
|||
TextWithTags &&caption,
|
||||
std::shared_ptr<SendingAlbum> album,
|
||||
const SendOptions &options) {
|
||||
if (list.files.size() > 1 && !caption.text.isEmpty()) {
|
||||
const auto isSticker = [&] {
|
||||
if (list.files.empty() || type != SendMediaType::File) {
|
||||
return false;
|
||||
}
|
||||
return list.files.front().mime == qstr("image/webp");
|
||||
};
|
||||
if ((list.files.size() > 1 || isSticker())
|
||||
&& !caption.text.isEmpty()) {
|
||||
auto message = MessageToSend(options.history);
|
||||
message.textWithTags = std::move(caption);
|
||||
message.replyTo = options.replyTo;
|
||||
|
|
Loading…
Add table
Reference in a new issue