Add premiumGiveawayParticipantStatusDisallowedCountry.

This commit is contained in:
levlam 2023-10-13 11:48:10 +03:00
parent d85182e5d0
commit 98b14b7326
2 changed files with 9 additions and 2 deletions

View File

@ -714,13 +714,16 @@ premiumGiveawayParticipantStatusEligible = PremiumGiveawayParticipantStatus;
//@description The user participates in the giveaway
premiumGiveawayParticipantStatusParticipating = PremiumGiveawayParticipantStatus;
//@description The user can't participate in the giveaway, because it has already been member of the chat
//@description The user can't participate in the giveaway, because they have already been member of the chat
//@joined_chat_date Point in time (Unix timestamp) when the user joined the chat
premiumGiveawayParticipantStatusAlreadyWasMember joined_chat_date:int32 = PremiumGiveawayParticipantStatus;
//@description The user is an administrator in one of the chats that created the giveaway @chat_id Identifier of the chat administered by the user
//@description The user can't participate in the giveaway, because they are an administrator in one of the chats that created the giveaway @chat_id Identifier of the chat administered by the user
premiumGiveawayParticipantStatusAdministrator chat_id:int53 = PremiumGiveawayParticipantStatus;
//@description The user can't participate in the giveaway, because they phone number is from a disallowed country @user_country_code A two-letter ISO 3166-1 alpha-2 country code of the user's country
premiumGiveawayParticipantStatusDisallowedCountry user_country_code:string = PremiumGiveawayParticipantStatus;
//@class PremiumGiveawayInfo @description Contains information about Telegram Premium giveaway

View File

@ -452,6 +452,10 @@ class GetGiveawayInfoQuery final : public Td::ResultHandler {
"premiumGiveawayParticipantStatusAdministrator"));
}
}
if (!info->disallowed_country_.empty()) {
return td_api::make_object<td_api::premiumGiveawayParticipantStatusDisallowedCountry>(
info->disallowed_country_);
}
if (info->participating_) {
return td_api::make_object<td_api::premiumGiveawayParticipantStatusParticipating>();
}