Update PollManager.cpp
This commit is contained in:
parent
0de571129b
commit
4e6ebda223
@ -496,10 +496,13 @@ vector<int32> PollManager::get_vote_percentage(const vector<int32> &voter_counts
|
|||||||
td_api::object_ptr<td_api::poll> PollManager::get_poll_object(PollId poll_id) const {
|
td_api::object_ptr<td_api::poll> PollManager::get_poll_object(PollId poll_id) const {
|
||||||
auto poll = get_poll(poll_id);
|
auto poll = get_poll(poll_id);
|
||||||
if (!(poll != nullptr)) {
|
if (!(poll != nullptr)) {
|
||||||
vector<td_api::object_ptr<td_api::pollOption>> opts;
|
vector<td_api::object_ptr<td_api::pollOption>> poll_options = [];
|
||||||
vector<int32> votes;
|
poll_options.push_back(td_api::make_object<td_api::pollOption>(
|
||||||
|
"empty", 0, 0, false,
|
||||||
|
false));
|
||||||
|
vector<int32> votes = [];
|
||||||
return td_api::make_object<td_api::poll>(
|
return td_api::make_object<td_api::poll>(
|
||||||
poll_id.get(), poll->question, std::move(opts), 0,
|
poll_id.get(), poll->question, std::move(poll_options), 0,
|
||||||
std::move(votes), true,
|
std::move(votes), true,
|
||||||
td_api::make_object<td_api::pollTypeRegular>(false),
|
td_api::make_object<td_api::pollTypeRegular>(false),
|
||||||
1, G()->unix_time() - 1, poll->is_closed);
|
1, G()->unix_time() - 1, poll->is_closed);
|
||||||
|
Loading…
Reference in New Issue
Block a user