mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Update API scheme on layer 166.
This commit is contained in:
@@ -286,8 +286,11 @@ void Premium::resolveGiveawayInfo(
|
||||
info.adminChannelId = data.vadmin_disallowed_chat_id()
|
||||
? ChannelId(*data.vadmin_disallowed_chat_id())
|
||||
: ChannelId();
|
||||
info.disallowedCountry = qs(
|
||||
data.vdisallowed_country().value_or_empty());
|
||||
info.tooEarlyDate
|
||||
= data.vjoined_too_early_date().value_or_empty();
|
||||
info.startDate = data.vstart_date().v;
|
||||
}, [&](const MTPDpayments_giveawayInfoResults &data) {
|
||||
info.state = data.is_refunded()
|
||||
? GiveawayState::Refunded
|
||||
@@ -295,6 +298,7 @@ void Premium::resolveGiveawayInfo(
|
||||
info.giftCode = qs(data.vgift_code_slug().value_or_empty());
|
||||
info.activatedCount = data.vactivated_count().v;
|
||||
info.finishDate = data.vfinish_date().v;
|
||||
info.startDate = data.vstart_date().v;
|
||||
});
|
||||
_giveawayInfoDone(std::move(info));
|
||||
}).fail([=] {
|
||||
|
@@ -46,10 +46,12 @@ enum class GiveawayState {
|
||||
|
||||
struct GiveawayInfo {
|
||||
QString giftCode;
|
||||
QString disallowedCountry;
|
||||
ChannelId adminChannelId = 0;
|
||||
GiveawayState state = GiveawayState::Invalid;
|
||||
TimeId tooEarlyDate = 0;
|
||||
TimeId finishDate = 0;
|
||||
TimeId startDate = 0;
|
||||
int winnersCount = 0;
|
||||
int activatedCount = 0;
|
||||
bool participating = false;
|
||||
|
Reference in New Issue
Block a user