From 84a513fe618bcdd03e82f8210ed5abe125cda5cd Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 29 Mar 2019 03:38:12 +0300 Subject: [PATCH] Add id to td_api::poll. GitOrigin-RevId: ec6734822c930048bf6c742668a89072428cc127 --- td/generate/scheme/td_api.tl | 4 ++-- td/generate/scheme/td_api.tlo | Bin 146508 -> 146536 bytes td/telegram/PollManager.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) 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 34d26c8028b56ff19f2e11b7dfc9e6f4fd0851c3..1a4db964f64f894fcda9b27a52aaf6817081c9a8 100644 GIT binary patch delta 86 zcmX@}gX6^yjtwkQ>|Mt$9AgQ{pIpx*yIDi(z#bNmz+{Ds3Y&SZA8{7|OBdwlCAk0q delta 82 zcmaFygX7E(jtwkQ?5nty>sSKvC)YE{Zq|@Gu!jXCFj?WE!e*Z9N8Clh(gpcBISdR8 dAok5;LOv|h8RZ!_gB7;#kZ0V!L!N1a3;^$<9N_=} 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) {