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,14 +32718,18 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
auto next_message = *it; auto next_message = *it;
if (next_message != nullptr) { if (next_message != nullptr) {
if (next_message->message_id.is_server()) { 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 LOG(ERROR) << "Attach " << message_id << " from " << source << " before " << next_message->message_id
<< " and after " << previous_message_id << " in " << dialog_id; << " and after " << previous_message_id << " in " << dialog_id;
dump_debug_message_op(d); dump_debug_message_op(d);
}
} }
} else { } 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 " LOG(ERROR) << "Have_next is true, but there is no next message after " << previous_message_id << " from "
<< source << " in " << dialog_id; << source << " in " << dialog_id;
dump_debug_message_op(d); dump_debug_message_op(d);
}
} }
} }