Silence forward info change warning when only author_signature changes.

GitOrigin-RevId: a0962b6e52c473902208ba84f9a6751889254c17
This commit is contained in:
levlam 2018-02-11 19:25:53 +03:00
parent 6b927449eb
commit cc24f0edcc

View File

@ -21797,11 +21797,14 @@ void MessagesManager::update_message(Dialog *d, unique_ptr<Message> &old_message
}
} else {
if (new_message->forward_info != nullptr) {
LOG_IF(ERROR, *old_message->forward_info != *new_message->forward_info &&
(!old_message->forward_info->sender_user_id.is_valid() ||
new_message->forward_info->sender_user_id.is_valid()))
<< message_id << " in " << dialog_id << " has changed forward info from " << *old_message->forward_info
<< " to " << *new_message->forward_info << ", really forwarded from " << old_message->debug_forward_from;
if (*old_message->forward_info != *new_message->forward_info &&
(!old_message->forward_info->sender_user_id.is_valid() ||
new_message->forward_info->sender_user_id.is_valid())) {
old_message->forward_info->author_signature = new_message->forward_info->author_signature;
LOG_IF(ERROR, *old_message->forward_info != *new_message->forward_info)
<< message_id << " in " << dialog_id << " has changed forward info from " << *old_message->forward_info
<< " to " << *new_message->forward_info << ", really forwarded from " << old_message->debug_forward_from;
}
old_message->forward_info = std::move(new_message->forward_info);
is_changed = true;
} else {