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

Update API scheme to layer 183. Paid media.

This commit is contained in:
John Preston
2024-06-18 14:02:05 +04:00
parent e71a067f4b
commit 3ece9b1566
25 changed files with 227 additions and 533 deletions

View File

@@ -1091,8 +1091,8 @@ void HistoryMessageReplyMarkup::updateData(
bool HistoryMessageReplyMarkup::hiddenBy(Data::Media *media) const {
if (media && (data.flags & ReplyMarkupFlag::OnlyBuyButton)) {
if (const auto invoice = media->invoice()) {
if (invoice->extendedPreview
&& (!invoice->extendedMedia || !invoice->receiptMsgId)) {
if (HasUnpaidMedia(*invoice)
|| (HasExtendedMedia(*invoice) && !invoice->receiptMsgId)) {
return true;
}
}