Ignore recent_voters for bots.

GitOrigin-RevId: 9a24c6b18364684a35a751a528cf332b69240de6
This commit is contained in:
levlam 2020-01-14 06:14:47 +03:00
parent 161b932256
commit 3bcbda16b1

View File

@ -1289,6 +1289,7 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
LOG(ERROR) << "Receive correct option " << correct_option_id << " in non-quiz " << poll_id;
}
vector<UserId> recent_voter_user_ids;
if (!td_->auth_manager_->is_bot()) {
for (auto &user_id_int : poll_results->recent_voters_) {
UserId user_id(user_id_int);
if (user_id.is_valid()) {
@ -1297,6 +1298,7 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
LOG(ERROR) << "Receive " << user_id << " as recent voter in " << poll_id;
}
}
}
if (poll->is_anonymous && !recent_voter_user_ids.empty()) {
LOG(ERROR) << "Receive anonymous " << poll_id << " with recent voters " << recent_voter_user_ids;
recent_voter_user_ids.clear();