Add some debug logginh.

GitOrigin-RevId: 462cf5c2f80f708ae2494b037538241f31d08ca3
This commit is contained in:
levlam 2018-02-03 18:41:10 +03:00
parent b9be89eff9
commit 35d039f42f
3 changed files with 9 additions and 2 deletions

View File

@ -1722,6 +1722,10 @@ vector<MessageEntity> get_message_entities(const ContactsManager *contacts_manag
LOG(ERROR) << "Receive unknown " << user_id << " in MentionName";
continue;
}
if (!contacts_manager->have_input_user(user_id)) {
LOG(ERROR) << "Receive unaccessible " << user_id << " in MentionName";
continue;
}
entities.emplace_back(entity_mention_name->offset_, entity_mention_name->length_, user_id);
break;
}

View File

@ -6483,7 +6483,10 @@ void MessagesManager::on_get_history(DialogId dialog_id, MessageId from_message_
}
is_dialog_updated = true;
} else {
CHECK(d->last_new_message_id.is_valid());
CHECK(d->last_new_message_id.is_valid())
<< dialog_id << " " << from_the_end << " " << d->first_database_message_id << " "
<< d->last_database_message_id << " " << first_added_message_id << " " << last_added_message_id << " "
<< d->last_message_id;
CHECK(d->first_database_message_id.is_valid());
{
MessagesConstIterator it(d, d->first_database_message_id);

View File

@ -329,7 +329,7 @@ bool UpdatesManager::is_acceptable_message_entities(
if (entity->get_id() == telegram_api::messageEntityMentionName::ID) {
auto entity_mention_name = static_cast<const telegram_api::messageEntityMentionName *>(entity.get());
UserId user_id(entity_mention_name->user_id_);
if (!td_->contacts_manager_->have_user(user_id)) {
if (!td_->contacts_manager_->have_user(user_id) || !td_->contacts_manager_->have_input_user(user_id)) {
return false;
}
}