mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix album sending with video processing.
This commit is contained in:
parent
267a51e800
commit
f091f2b344
2 changed files with 7 additions and 0 deletions
|
@ -4231,6 +4231,7 @@ void ApiWrap::sendMultiPaidMedia(
|
||||||
auto &histories = history->owner().histories();
|
auto &histories = history->owner().histories();
|
||||||
const auto peer = history->peer;
|
const auto peer = history->peer;
|
||||||
const auto itemId = item->fullId();
|
const auto itemId = item->fullId();
|
||||||
|
album->sent = true;
|
||||||
histories.sendPreparedMessage(
|
histories.sendPreparedMessage(
|
||||||
history,
|
history,
|
||||||
replyTo,
|
replyTo,
|
||||||
|
@ -4302,6 +4303,9 @@ void ApiWrap::sendAlbumWithCancelled(
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
|
void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
|
||||||
|
if (album->sent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto groupId = album->groupId;
|
const auto groupId = album->groupId;
|
||||||
if (album->items.empty()) {
|
if (album->items.empty()) {
|
||||||
_sendingAlbums.remove(groupId);
|
_sendingAlbums.remove(groupId);
|
||||||
|
@ -4326,6 +4330,7 @@ void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
|
||||||
return;
|
return;
|
||||||
} else if (medias.size() < 2) {
|
} else if (medias.size() < 2) {
|
||||||
const auto &single = medias.front().data();
|
const auto &single = medias.front().data();
|
||||||
|
album->sent = true;
|
||||||
sendMediaWithRandomId(
|
sendMediaWithRandomId(
|
||||||
sample,
|
sample,
|
||||||
single.vmedia(),
|
single.vmedia(),
|
||||||
|
@ -4352,6 +4357,7 @@ void ApiWrap::sendAlbumIfReady(not_null<SendingAlbum*> album) {
|
||||||
| (album->options.invertCaption ? Flag::f_invert_media : Flag(0));
|
| (album->options.invertCaption ? Flag::f_invert_media : Flag(0));
|
||||||
auto &histories = history->owner().histories();
|
auto &histories = history->owner().histories();
|
||||||
const auto peer = history->peer;
|
const auto peer = history->peer;
|
||||||
|
album->sent = true;
|
||||||
histories.sendPreparedMessage(
|
histories.sendPreparedMessage(
|
||||||
history,
|
history,
|
||||||
replyTo,
|
replyTo,
|
||||||
|
|
|
@ -128,6 +128,7 @@ struct SendingAlbum {
|
||||||
uint64 groupId = 0;
|
uint64 groupId = 0;
|
||||||
std::vector<Item> items;
|
std::vector<Item> items;
|
||||||
Api::SendOptions options;
|
Api::SendOptions options;
|
||||||
|
bool sent = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue