From c7c1deab8119499974dd41c255b2b0e84d377837 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 23 Sep 2018 22:55:14 +0300 Subject: [PATCH] Add caption to first item of album istead of sending separated message. --- Telegram/SourceFiles/apiwrap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index be7984da7..774bbd51e 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -4309,7 +4309,7 @@ void ApiWrap::sendFiles( return list.files.front().mime == qstr("image/webp"); }; if ((list.files.size() > 1 || isSticker()) - && !caption.text.isEmpty()) { + && !caption.text.isEmpty() && !album) { auto message = MessageToSend(options.history); message.textWithTags = std::move(caption); message.replyTo = options.replyTo; @@ -4344,6 +4344,7 @@ void ApiWrap::sendFiles( to, caption, album)); + caption = TextWithTags(); } if (album) { _sendingAlbums.emplace(album->groupId, album);