diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp index 0e3a177f3..54fa1632e 100644 --- a/Telegram/SourceFiles/export/data/export_data_types.cpp +++ b/Telegram/SourceFiles/export/data/export_data_types.cpp @@ -1562,10 +1562,11 @@ ServiceAction ParseServiceAction( content.cost = Ui::FillAmountAndCurrency( data.vamount().v, qs(data.vcurrency())).toUtf8(); - content.stars = data.vstars().v; + content.credits = data.vstars().v; result.content = content; }, [&](const MTPDmessageActionPrizeStars &data) { auto content = ActionPrizeStars(); + content.peerId = ParsePeerId(data.vboost_peer()); content.amount = data.vstars().v; result.content = content; }, [](const MTPDmessageActionEmpty &data) {}); diff --git a/Telegram/SourceFiles/export/data/export_data_types.h b/Telegram/SourceFiles/export/data/export_data_types.h index 371720399..59d53aea2 100644 --- a/Telegram/SourceFiles/export/data/export_data_types.h +++ b/Telegram/SourceFiles/export/data/export_data_types.h @@ -605,10 +605,11 @@ struct ActionPaymentRefunded { struct ActionGiftStars { Utf8String cost; - int stars = 0; + int credits = 0; }; struct ActionPrizeStars { + PeerId peerId = 0; uint64 amount = 0; }; diff --git a/Telegram/SourceFiles/export/output/export_output_html.cpp b/Telegram/SourceFiles/export/output/export_output_html.cpp index a36397313..822854d58 100644 --- a/Telegram/SourceFiles/export/output/export_output_html.cpp +++ b/Telegram/SourceFiles/export/output/export_output_html.cpp @@ -1330,17 +1330,21 @@ auto HtmlWriter::Wrap::pushMessage( + amount; return result; }, [&](const ActionGiftStars &data) { - if (!data.stars || data.cost.isEmpty()) { + if (!data.credits || data.cost.isEmpty()) { return serviceFrom + " sent you a gift."; } return serviceFrom + " sent you a gift for " + data.cost + ": " - + QString::number(data.stars).toUtf8() + + QString::number(data.credits).toUtf8() + " Telegram Stars."; }, [&](const ActionPrizeStars &data) { - return serviceFrom + " prize stars."; AssertIsDebug(); + return "You won a prize in a giveaway organized by " + + peers.wrapPeerName(data.peerId) + + ".\n Your prize is " + + QString::number(data.amount).toUtf8() + + " Telegram Stars."; }, [](v::null_t) { return QByteArray(); }); if (!serviceText.isEmpty()) { diff --git a/Telegram/SourceFiles/export/output/export_output_json.cpp b/Telegram/SourceFiles/export/output/export_output_json.cpp index 05b7d232a..8244b8c69 100644 --- a/Telegram/SourceFiles/export/output/export_output_json.cpp +++ b/Telegram/SourceFiles/export/output/export_output_json.cpp @@ -638,8 +638,8 @@ QByteArray SerializeMessage( if (!data.cost.isEmpty()) { push("cost", data.cost); } - if (data.stars) { - push("stars", data.stars); + if (data.credits) { + push("stars", data.credits); } }, [&](const ActionPrizeStars &data) { pushActor();