Do not apply correct_option_id from min Poll.
GitOrigin-RevId: f9a21119573ff591d1d710839a329ae916654b02
This commit is contained in:
parent
faef50b444
commit
7d2eb31731
@ -1263,7 +1263,6 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
|
|||||||
option.is_chosen = is_chosen;
|
option.is_chosen = is_chosen;
|
||||||
is_changed = true;
|
is_changed = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
bool is_correct = (poll_result->flags_ & telegram_api::pollAnswerVoters::CORRECT_MASK) != 0;
|
bool is_correct = (poll_result->flags_ & telegram_api::pollAnswerVoters::CORRECT_MASK) != 0;
|
||||||
if (is_correct) {
|
if (is_correct) {
|
||||||
if (correct_option_id != -1) {
|
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);
|
correct_option_id = static_cast<int32>(i);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
correct_option_id = poll->correct_option_id;
|
||||||
|
}
|
||||||
|
|
||||||
if (poll_result->voters_ < 0) {
|
if (poll_result->voters_ < 0) {
|
||||||
LOG(ERROR) << "Receive " << poll_result->voters_ << " voters for an option in " << poll_id;
|
LOG(ERROR) << "Receive " << poll_result->voters_ << " voters for an option in " << poll_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user