Avoid printing an error when delaying get_difference

This commit is contained in:
Andrea Cavalli 2021-03-21 13:00:55 +01:00
parent 78291a96d4
commit 316d87af77

View File

@ -32718,16 +32718,20 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
auto next_message = *it;
if (next_message != nullptr) {
if (next_message->message_id.is_server()) {
if (G()->shared_config().get_option_integer("get_channel_difference_delay_milliseconds", 0) <= 0) {
LOG(ERROR) << "Attach " << message_id << " from " << source << " before " << next_message->message_id
<< " and after " << previous_message_id << " in " << dialog_id;
dump_debug_message_op(d);
}
}
} else {
if (G()->shared_config().get_option_integer("get_channel_difference_delay_milliseconds", 0) <= 0) {
LOG(ERROR) << "Have_next is true, but there is no next message after " << previous_message_id << " from "
<< source << " in " << dialog_id;
dump_debug_message_op(d);
}
}
}
LOG(INFO) << "Attach " << message_id << " to the previous " << previous_message_id << " in " << dialog_id;
message->have_previous = true;