Do not apply correct_option_id from min Poll.

GitOrigin-RevId: f9a21119573ff591d1d710839a329ae916654b02
This commit is contained in:
levlam 2020-01-17 20:29:56 +03:00
parent faef50b444
commit 7d2eb31731

View File

@ -1263,7 +1263,6 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
option.is_chosen = is_chosen;
is_changed = true;
}
}
bool is_correct = (poll_result->flags_ & telegram_api::pollAnswerVoters::CORRECT_MASK) != 0;
if (is_correct) {
if (correct_option_id != -1) {
@ -1271,6 +1270,9 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
}
correct_option_id = static_cast<int32>(i);
}
} else {
correct_option_id = poll->correct_option_id;
}
if (poll_result->voters_ < 0) {
LOG(ERROR) << "Receive " << poll_result->voters_ << " voters for an option in " << poll_id;