diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index ae663323b..80a0c1c91 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2340,9 +2340,9 @@ messageExtendedMediaUnsupported caption:formattedText = MessageExtendedMedia; //@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription //@additional_chat_ids Identifiers of other channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats //@winners_selection_date Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways -//@only_new_subscribers True, if only new subscribers of the chats will be eligible for the giveaway +//@only_new_members True, if only new subscribers of the chats will be eligible for the giveaway //@country_codes The list of two-letter ISO 3166-1 alpha-2 codes of countries, only users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption("giveaway_country_count_max") chosen countries -premiumGiveawayParameters boosted_chat_id:int53 additional_chat_ids:vector winners_selection_date:int32 only_new_subscribers:Bool country_codes:vector = PremiumGiveawayParameters; +premiumGiveawayParameters boosted_chat_id:int53 additional_chat_ids:vector winners_selection_date:int32 only_new_members:Bool country_codes:vector = PremiumGiveawayParameters; //@description File with the date it was uploaded @file The file @date Point in time (Unix timestamp) when the file was uploaded diff --git a/td/telegram/GiveawayParameters.cpp b/td/telegram/GiveawayParameters.cpp index 6ad32bfaa..a911aceb9 100644 --- a/td/telegram/GiveawayParameters.cpp +++ b/td/telegram/GiveawayParameters.cpp @@ -63,7 +63,7 @@ Result GiveawayParameters::get_giveaway_parameters( td->option_manager_->get_option_integer("giveaway_country_count_max")) { return Status::Error(400, "Too many countries specified"); } - return GiveawayParameters(boosted_channel_id, std::move(additional_channel_ids), parameters->only_new_subscribers_, + return GiveawayParameters(boosted_channel_id, std::move(additional_channel_ids), parameters->only_new_members_, parameters->winners_selection_date_, vector(parameters->country_codes_)); } @@ -142,7 +142,7 @@ bool operator!=(const GiveawayParameters &lhs, const GiveawayParameters &rhs) { StringBuilder &operator<<(StringBuilder &string_builder, const GiveawayParameters &giveaway_parameters) { return string_builder << "Giveaway[" << giveaway_parameters.boosted_channel_id_ << " + " << giveaway_parameters.additional_channel_ids_ - << (giveaway_parameters.only_new_subscribers_ ? " only for new subscribes" : "") + << (giveaway_parameters.only_new_subscribers_ ? " only for new members" : "") << " for countries " << giveaway_parameters.country_codes_ << " at " << giveaway_parameters.date_ << ']'; }