diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index e73417b2..38c7ccdf 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -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 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 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 diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 34d26c80..1a4db964 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 6de9dd21..4a4c17ea 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -456,7 +456,8 @@ td_api::object_ptr 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(poll->question, std::move(poll_options), total_voter_count, poll->is_closed); + return td_api::make_object(poll_id.get(), poll->question, std::move(poll_options), total_voter_count, + poll->is_closed); } telegram_api::object_ptr PollManager::get_input_poll_option(const PollOption &poll_option) {