Ignore polls without answers.

GitOrigin-RevId: 6087b7b68e05c04bf26e017a1250c7aac6a2900e
This commit is contained in:
levlam 2020-05-23 16:22:44 +03:00
parent e2fd1c13e9
commit eb9a3e7ca3
1 changed files with 4 additions and 0 deletions

View File

@ -1305,6 +1305,10 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
LOG(ERROR) << "Receive poll " << poll_server->id_ << " instead of " << poll_id;
return PollId();
}
if (poll_server != nullptr && poll_server->answers_.empty()) {
LOG(ERROR) << "Receive " << poll_id << " without answers: " << to_string(poll_server);
return PollId();
}
auto poll = get_poll_force(poll_id);
bool is_changed = false;