Update API scheme on layer 200.

This commit is contained in:
John Preston
2025-02-17 11:57:24 +04:00
parent bbc14ba74f
commit 74b71b92b6
13 changed files with 26 additions and 58 deletions

View File

@@ -1704,10 +1704,6 @@ ServiceAction ParseServiceAction(
.giftId = uint64(gift.vid().v),
};
});
}, [&](const MTPDmessageActionPaidMessage &data) {
result.content = ActionPaidMessage{
.stars = int64(data.vstars().v),
};
}, [](const MTPDmessageActionEmpty &data) {});
return result;
}

View File

@@ -662,10 +662,6 @@ struct ActionStarGift {
bool limited = false;
};
struct ActionPaidMessage {
int64 stars = 0;
};
struct ServiceAction {
std::variant<
v::null_t,
@@ -711,8 +707,7 @@ struct ServiceAction {
ActionPaymentRefunded,
ActionGiftStars,
ActionPrizeStars,
ActionStarGift,
ActionPaidMessage> content;
ActionStarGift> content;
};
ServiceAction ParseServiceAction(

View File

@@ -1367,11 +1367,6 @@ auto HtmlWriter::Wrap::pushMessage(
+ " sent you a gift of "
+ QByteArray::number(data.stars)
+ " Telegram Stars.";
}, [&](const ActionPaidMessage &data) {
return serviceFrom
+ " paid for the message "
+ QString::number(data.stars).toUtf8()
+ " Telegram Stars.";
}, [](v::null_t) { return QByteArray(); });
if (!serviceText.isEmpty()) {

View File

@@ -663,10 +663,6 @@ QByteArray SerializeMessage(
push("is_limited", data.limited);
push("is_anonymous", data.anonymous);
pushBare("gift_text", SerializeText(context, data.text));
}, [&](const ActionPaidMessage &data) {
pushActor();
pushAction("send_paid_message");
push("stars", data.stars);
}, [](v::null_t) {});
if (v::is_null(message.action.content)) {