From 4e6ebda2239de49554a2d9f073bc2746f9df27f5 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 12 Jan 2021 03:31:59 +0100 Subject: [PATCH] Update PollManager.cpp --- td/telegram/PollManager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index c68e828fc..884e1cc1c 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -496,10 +496,13 @@ vector PollManager::get_vote_percentage(const vector &voter_counts td_api::object_ptr PollManager::get_poll_object(PollId poll_id) const { auto poll = get_poll(poll_id); if (!(poll != nullptr)) { - vector> opts; - vector votes; + vector> poll_options = []; + poll_options.push_back(td_api::make_object( + "empty", 0, 0, false, + false)); + vector votes = []; return td_api::make_object( - poll_id.get(), poll->question, std::move(opts), 0, + poll_id.get(), poll->question, std::move(poll_options), 0, std::move(votes), true, td_api::make_object(false), 1, G()->unix_time() - 1, poll->is_closed);