Ignore invalid polls stored in database.
This commit is contained in:
parent
4c390b4988
commit
387e84004b
|
@ -376,9 +376,8 @@ void PollManager::on_load_poll_from_database(PollId poll_id, string value) {
|
||||||
CHECK(!have_poll(poll_id));
|
CHECK(!have_poll(poll_id));
|
||||||
if (!value.empty()) {
|
if (!value.empty()) {
|
||||||
auto poll = make_unique<Poll>();
|
auto poll = make_unique<Poll>();
|
||||||
auto status = log_event_parse(*poll, value);
|
if (log_event_parse(*poll, value).is_error()) {
|
||||||
if (status.is_error()) {
|
return;
|
||||||
LOG(FATAL) << status << ": " << format::as_hex_dump<4>(Slice(value));
|
|
||||||
}
|
}
|
||||||
for (auto &user_id : poll->recent_voter_user_ids) {
|
for (auto &user_id : poll->recent_voter_user_ids) {
|
||||||
td_->contacts_manager_->have_user_force(user_id);
|
td_->contacts_manager_->have_user_force(user_id);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user