Fix poll parsing.
GitOrigin-RevId: a2089864c44b80a6a7f2e6f75c3cb8e533c9f839
This commit is contained in:
parent
befcc27ee2
commit
fb3a4b49aa
@ -1325,16 +1325,16 @@ PollId PollManager::on_get_poll(PollId poll_id, tl_object_ptr<telegram_api::poll
|
|||||||
std::unordered_set<Slice, SliceHash> option_data;
|
std::unordered_set<Slice, SliceHash> option_data;
|
||||||
for (auto &answer : poll_server->answers_) {
|
for (auto &answer : poll_server->answers_) {
|
||||||
if (answer->option_.empty()) {
|
if (answer->option_.empty()) {
|
||||||
LOG(ERROR) << "Receive " << poll_id << " with empty option data: " << to_string(poll_server);
|
LOG(ERROR) << "Receive " << poll_id << " with an empty option data: " << to_string(poll_server);
|
||||||
return PollId();
|
return PollId();
|
||||||
}
|
}
|
||||||
option_data.insert(answer->option_.as_slice());
|
option_data.insert(answer->option_.as_slice());
|
||||||
}
|
}
|
||||||
if (option_data.size() != poll_server->answers_.size()) {
|
if (option_data.size() != poll_server->answers_.size()) {
|
||||||
LOG(ERROR) << "Receive " << poll_id << " with duplicate options: " << to_string(poll_server);
|
LOG(ERROR) << "Receive " << poll_id << " with duplicate options: " << to_string(poll_server);
|
||||||
}
|
|
||||||
return PollId();
|
return PollId();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto poll = get_poll_force(poll_id);
|
auto poll = get_poll_force(poll_id);
|
||||||
bool is_changed = false;
|
bool is_changed = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user