2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +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

@@ -2092,6 +2092,9 @@ MediaData HtmlWriter::Wrap::prepareMediaData(
result.status = Data::FormatMoneyAmount(data.amount, data.currency);
}, [](const Poll &data) {
}, [](const GiveawayStart &data) {
}, [&](const PaidMedia &data) {
result.classes = "media_invoice";
result.status = Data::FormatMoneyAmount(data.stars, "XTR");
}, [](const UnsupportedMedia &data) {
Unexpected("Unsupported message.");
}, [](v::null_t) {});

View File

@@ -779,6 +779,8 @@ QByteArray SerializeMessage(
{ "until_date", SerializeDate(data.untilDate) },
{ "channels", serialized },
}));
}, [&](const PaidMedia &data) {
push("paid_stars_amount", data.stars);
}, [](const UnsupportedMedia &data) {
Unexpected("Unsupported message.");
}, [](v::null_t) {});