Add id to td_api::poll.

GitOrigin-RevId: ec6734822c930048bf6c742668a89072428cc127
This commit is contained in:
levlam 2019-03-29 03:38:12 +03:00
parent 2facb494d3
commit 84a513fe61
3 changed files with 4 additions and 3 deletions

View File

@ -242,8 +242,8 @@ venue location:location title:string address:string provider:string id:string ty
//@param_description Game description @photo Game photo @animation Game animation; may be null
game id:int64 short_name:string title:string text:formattedText description:string photo:photo animation:animation = Game;
//@description Describes a poll @question Poll question, 1-255 characters @options List of poll answer options @total_voter_count Total number of voters, participating in the poll @is_closed True, if the poll is closed
poll question:string options:vector<pollOption> total_voter_count:int32 is_closed:Bool = Poll;
//@description Describes a poll @id Unique poll identifier @question Poll question, 1-255 characters @options List of poll answer options @total_voter_count Total number of voters, participating in the poll @is_closed True, if the poll is closed
poll id:int64 question:string options:vector<pollOption> total_voter_count:int32 is_closed:Bool = Poll;
//@description Describes a user profile photo @id Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of userProfilePhotos

Binary file not shown.

View File

@ -456,7 +456,8 @@ td_api::object_ptr<td_api::poll> PollManager::get_poll_object(PollId poll_id) co
for (size_t i = 0; i < poll_options.size(); i++) {
poll_options[i]->vote_percentage_ = vote_percentage[i];
}
return td_api::make_object<td_api::poll>(poll->question, std::move(poll_options), total_voter_count, poll->is_closed);
return td_api::make_object<td_api::poll>(poll_id.get(), poll->question, std::move(poll_options), total_voter_count,
poll->is_closed);
}
telegram_api::object_ptr<telegram_api::pollAnswer> PollManager::get_input_poll_option(const PollOption &poll_option) {