mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added support of service actions for premium gifts to export.
This commit is contained in:
@@ -1128,6 +1128,15 @@ auto HtmlWriter::Wrap::pushMessage(
|
||||
return "You have just successfully transferred data from the «"
|
||||
+ SerializeString(data.text)
|
||||
+ "» button to the bot";
|
||||
}, [&](const ActionGiftPremium &data) {
|
||||
if (!data.months || data.cost.isEmpty()) {
|
||||
return (serviceFrom + " sent you a gift.");
|
||||
}
|
||||
return (serviceFrom
|
||||
+ " sent you a gift for "
|
||||
+ data.cost
|
||||
+ ": Telegram Premium for "
|
||||
+ QString::number(data.months).toUtf8() + " months.");
|
||||
}, [](v::null_t) { return QByteArray(); });
|
||||
|
||||
if (!serviceText.isEmpty()) {
|
||||
|
@@ -546,6 +546,15 @@ QByteArray SerializeMessage(
|
||||
}, [&](const ActionWebViewDataSent &data) {
|
||||
pushAction("send_webview_data");
|
||||
push("text", data.text);
|
||||
}, [&](const ActionGiftPremium &data) {
|
||||
pushActor();
|
||||
pushAction("send_premium_gift");
|
||||
if (!data.cost.isEmpty()) {
|
||||
push("cost", data.cost);
|
||||
}
|
||||
if (data.months) {
|
||||
push("months", data.months);
|
||||
}
|
||||
}, [](v::null_t) {});
|
||||
|
||||
if (v::is_null(message.action.content)) {
|
||||
|
Reference in New Issue
Block a user