Improve some spelling.

This commit is contained in:
levlam 2021-03-15 03:32:14 +03:00
parent b9f7668b07
commit 0339921102
28 changed files with 78 additions and 72 deletions

View File

@ -66,8 +66,8 @@ class TdExample {
} else if (!are_authorized_) {
process_response(client_manager_->receive(10));
} else {
std::cout << "Enter action [q] quit [u] check for updates and request results [c] show chats [m <id> <text>] "
"send message [me] show self [l] logout: "
std::cout << "Enter action [q] quit [u] check for updates and request results [c] show chats [m <chat_id> "
"<text>] send message [me] show self [l] logout: "
<< std::endl;
std::string line;
std::getline(std::cin, line);
@ -123,7 +123,7 @@ class TdExample {
}
auto chats = td::move_tl_object_as<td_api::chats>(object);
for (auto chat_id : chats->chat_ids_) {
std::cout << "[id:" << chat_id << "] [title:" << chat_title_[chat_id] << "]" << std::endl;
std::cout << "[chat_id:" << chat_id << "] [title:" << chat_title_[chat_id] << "]" << std::endl;
}
});
}

View File

@ -284,7 +284,7 @@ FileId AnimationsManager::dup_animation(FileId new_id, FileId old_id) {
bool AnimationsManager::merge_animations(FileId new_id, FileId old_id, bool can_delete_old) {
if (!old_id.is_valid()) {
LOG(ERROR) << "Old file id is invalid";
LOG(ERROR) << "Old file identifier is invalid";
return true;
}

View File

@ -111,7 +111,7 @@ FileId AudiosManager::dup_audio(FileId new_id, FileId old_id) {
bool AudiosManager::merge_audios(FileId new_id, FileId old_id, bool can_delete_old) {
if (!old_id.is_valid()) {
LOG(ERROR) << "Old file id is invalid";
LOG(ERROR) << "Old file identifier is invalid";
return true;
}

View File

@ -308,7 +308,7 @@ void AuthManager::check_password(uint64 query_id, string password) {
return on_query_error(query_id, Status::Error(8, "Call to checkAuthenticationPassword unexpected"));
}
LOG(INFO) << "Have SRP id " << wait_password_state_.srp_id_;
LOG(INFO) << "Have SRP ID " << wait_password_state_.srp_id_;
on_new_query(query_id);
password_ = std::move(password);
start_net_query(NetQueryType::GetPassword,
@ -569,7 +569,7 @@ void AuthManager::on_get_password_result(NetQueryPtr &result) {
}
if (state_ == State::WaitPassword) {
LOG(INFO) << "Have SRP id " << wait_password_state_.srp_id_;
LOG(INFO) << "Have SRP ID " << wait_password_state_.srp_id_;
auto hash = PasswordManager::get_input_check_password(password_, wait_password_state_.current_client_salt_,
wait_password_state_.current_server_salt_,
wait_password_state_.srp_g_, wait_password_state_.srp_p_,

View File

@ -3467,7 +3467,7 @@ UserId ContactsManager::load_my_id() {
return my_id;
}
LOG(ERROR) << "Wrong my id = \"" << id_string << "\" stored in database";
LOG(ERROR) << "Wrong my ID = \"" << id_string << "\" stored in database";
}
return UserId();
}
@ -4891,7 +4891,7 @@ FolderId ContactsManager::get_secret_chat_initial_folder_id(SecretChatId secret_
}
UserId ContactsManager::get_my_id() const {
LOG_IF(ERROR, !my_id_.is_valid()) << "Wrong or unknown my id returned";
LOG_IF(ERROR, !my_id_.is_valid()) << "Wrong or unknown my ID returned";
return my_id_;
}
@ -4901,7 +4901,7 @@ void ContactsManager::set_my_id(UserId my_id) {
LOG(ERROR) << "Already know that me is " << my_old_id << " but received userSelf with " << my_id;
}
if (!my_id.is_valid()) {
LOG(ERROR) << "Receive invalid my id " << my_id;
LOG(ERROR) << "Receive invalid my ID " << my_id;
return;
}
if (my_old_id != my_id) {

View File

@ -364,7 +364,7 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
// fix_animated_sticker_type();
}
LOG(DEBUG) << "Receive document with id = " << id << " of type " << document_type;
LOG(DEBUG) << "Receive document with ID = " << id << " of type " << document_type;
if (!is_web && !DcId::is_valid(dc_id)) {
LOG(ERROR) << "Wrong dc_id = " << dc_id;
return {};
@ -646,7 +646,7 @@ FileId DocumentsManager::dup_document(FileId new_id, FileId old_id) {
bool DocumentsManager::merge_documents(FileId new_id, FileId old_id, bool can_delete_old) {
if (!old_id.is_valid()) {
LOG(ERROR) << "Old file id is invalid";
LOG(ERROR) << "Old file identifier is invalid";
return true;
}

View File

@ -120,7 +120,7 @@ bool operator!=(const Game &lhs, const Game &rhs) {
}
StringBuilder &operator<<(StringBuilder &string_builder, const Game &game) {
return string_builder << "Game[id = " << game.id_ << ", access_hash = " << game.access_hash_
return string_builder << "Game[ID = " << game.id_ << ", access_hash = " << game.access_hash_
<< ", bot = " << game.bot_user_id_ << ", short_name = " << game.short_name_
<< ", title = " << game.title_ << ", description = " << game.description_
<< ", photo = " << game.photo_ << ", animation_file_id = " << game.animation_file_id_ << "]";

View File

@ -206,7 +206,7 @@ tl_object_ptr<telegram_api::inputBotInlineMessageID> InlineQueriesManager::get_i
if (!DcId::is_valid(result->dc_id_)) {
return nullptr;
}
LOG(INFO) << "Have inline message id: " << to_string(result);
LOG(INFO) << "Have inline message identifier: " << to_string(result);
return result;
}
@ -215,7 +215,7 @@ string InlineQueriesManager::get_inline_message_id(
if (input_bot_inline_message_id == nullptr) {
return string();
}
LOG(INFO) << "Got inline message id: " << to_string(input_bot_inline_message_id);
LOG(INFO) << "Got inline message identifier: " << to_string(input_bot_inline_message_id);
return base64url_encode(serialize(*input_bot_inline_message_id));
}

View File

@ -12606,7 +12606,7 @@ void MessagesManager::init() {
} else if (begins_with(log_string, " local message ")) {
log_string.remove_prefix(15);
} else {
LOG(ERROR) << "Message id expected, found " << log_string;
LOG(ERROR) << "Message identifier expected, found " << log_string;
continue;
}
@ -13512,7 +13512,7 @@ std::pair<DialogId, unique_ptr<MessagesManager::Message>> MessagesManager::creat
message->contains_mention || dialog_type == DialogType::User);
if (content_type == MessageContentType::ExpiredPhoto || content_type == MessageContentType::ExpiredVideo) {
CHECK(message->ttl == 0); // ttl is ignored/set to 0 if the message has already been expired
CHECK(message->ttl == 0); // TTL is ignored/set to 0 if the message has already been expired
if (message->reply_markup != nullptr) {
if (message->reply_markup->type != ReplyMarkup::Type::InlineKeyboard) {
message->had_reply_markup = true;
@ -13527,7 +13527,7 @@ std::pair<DialogId, unique_ptr<MessagesManager::Message>> MessagesManager::creat
if (message_info.media_album_id != 0) {
if (!is_allowed_media_group_content(content_type)) {
LOG(ERROR) << "Receive media group id " << message_info.media_album_id << " in " << message_id << " from "
LOG(ERROR) << "Receive media group identifier " << message_info.media_album_id << " in " << message_id << " from "
<< dialog_id << " with content "
<< oneline(to_string(
get_message_content_object(message->content.get(), td_, message->date, is_content_secret)));
@ -13616,14 +13616,14 @@ FullMessageId MessagesManager::on_get_message(MessageInfo &&message_info, bool f
if (message_id <= d->last_new_message_id) {
if (get_message_force(d, message_id, "receive missed unsent message not from update") != nullptr) {
LOG(ERROR) << "New " << old_message_id << "/" << message_id << " in " << dialog_id << " from " << source
<< " has id less than last_new_message_id = " << d->last_new_message_id;
<< " has identifier less than last_new_message_id = " << d->last_new_message_id;
return FullMessageId();
}
// if there is no message yet, then it is likely was missed because of a server bug and is being repaired via
// get_message_from_server from after_get_difference
// TODO move to INFO
LOG(ERROR) << "Receive " << old_message_id << "/" << message_id << " in " << dialog_id << " from " << source
<< " with id less than last_new_message_id = " << d->last_new_message_id
<< " with identifier less than last_new_message_id = " << d->last_new_message_id
<< " and trying to add it anyway";
} else {
LOG(ERROR) << "Ignore " << old_message_id << "/" << message_id << " received not through update from " << source
@ -14880,8 +14880,8 @@ void MessagesManager::fix_dialog_last_notification_id(Dialog *d, bool from_menti
CHECK(!message_id.is_scheduled());
MessagesConstIterator it(d, message_id);
auto &group_info = from_mentions ? d->mention_notification_group : d->message_notification_group;
VLOG(notifications) << "Trying to fix last notification id in " << group_info.group_id << " from " << d->dialog_id
<< " from " << message_id << "/" << group_info.last_notification_id;
VLOG(notifications) << "Trying to fix last notification identifier in " << group_info.group_id << " from "
<< d->dialog_id << " from " << message_id << "/" << group_info.last_notification_id;
if (*it != nullptr && ((*it)->message_id == message_id || (*it)->have_next)) {
while (*it != nullptr) {
const Message *m = *it;
@ -25849,7 +25849,8 @@ unique_ptr<MessagesManager::MessageForwardInfo> MessagesManager::get_message_for
if (forward_header->from_id_ != nullptr) {
sender_dialog_id = DialogId(forward_header->from_id_);
if (!sender_dialog_id.is_valid()) {
LOG(ERROR) << "Receive invalid sender id in message forward header: " << oneline(to_string(forward_header));
LOG(ERROR) << "Receive invalid sender identifier in message forward header: "
<< oneline(to_string(forward_header));
sender_dialog_id = DialogId();
}
}
@ -27247,7 +27248,7 @@ MessagesManager::MessageNotificationGroup MessagesManager::get_message_notificat
if (last_notification_date != group_info.last_notification_date ||
last_notification_id != group_info.last_notification_id) {
LOG(ERROR) << "Fix last notification date in " << d->dialog_id << " from " << group_info.last_notification_date
<< " to " << last_notification_date << " and last notification id from "
<< " to " << last_notification_date << " and last notification identifier from "
<< group_info.last_notification_id << " to " << last_notification_id;
set_dialog_last_notification(d->dialog_id, group_info, last_notification_date, last_notification_id,
"get_message_notification_group_force");
@ -27354,7 +27355,7 @@ vector<Notification> MessagesManager::get_message_notifications_from_database_fo
auto notification_id = m->notification_id.is_valid() ? m->notification_id : m->removed_notification_id;
if (!notification_id.is_valid()) {
VLOG(ERROR) << "Can't find notification ID for " << m->message_id << " in " << d->dialog_id;
VLOG(ERROR) << "Can't find notification identifier for " << m->message_id << " in " << d->dialog_id;
continue;
}
CHECK(m->message_id.is_valid());
@ -27362,7 +27363,7 @@ vector<Notification> MessagesManager::get_message_notifications_from_database_fo
bool is_correct = true;
if (notification_id.get() >= from_notification_id.get()) {
// possible if two messages has the same notification_id
LOG(ERROR) << "Have nonmonotoic notification ids: " << d->dialog_id << " " << m->message_id << " "
LOG(ERROR) << "Have nonmonotonic notification identifiers: " << d->dialog_id << " " << m->message_id << " "
<< notification_id << " " << from_message_id << " " << from_notification_id;
is_correct = false;
} else {
@ -27370,8 +27371,8 @@ vector<Notification> MessagesManager::get_message_notifications_from_database_fo
is_found = true;
}
if (m->message_id >= from_message_id) {
LOG(ERROR) << "Have nonmonotoic message ids: " << d->dialog_id << " " << m->message_id << " " << notification_id
<< " " << from_message_id << " " << from_notification_id;
LOG(ERROR) << "Have nonmonotonic message identifiers: " << d->dialog_id << " " << m->message_id << " "
<< notification_id << " " << from_message_id << " " << from_notification_id;
is_correct = false;
} else {
from_message_id = m->message_id;
@ -27610,7 +27611,7 @@ void MessagesManager::on_get_message_notifications_from_database(DialogId dialog
auto notification_id = m->notification_id.is_valid() ? m->notification_id : m->removed_notification_id;
if (!notification_id.is_valid()) {
VLOG(ERROR) << "Can't find notification ID for " << m->message_id << " in " << d->dialog_id;
VLOG(ERROR) << "Can't find notification identifier for " << m->message_id << " in " << d->dialog_id;
continue;
}
CHECK(m->message_id.is_valid());
@ -31958,7 +31959,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
<< d->last_new_message_id << " to " << message_id;
}
LOG(ERROR) << "New " << message_id << " in " << dialog_id << " from " << source
<< " has id less than last_new_message_id = " << d->last_new_message_id;
<< " has identifier less than last_new_message_id = " << d->last_new_message_id;
dump_debug_message_op(d);
}
}
@ -32404,7 +32405,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
set_dialog_last_read_inbox_message_id(d, MessageId::min(), server_unread_count, local_unread_count, false,
source);
} else {
// if non-scheduled outgoing message has id one greater than last_read_inbox_message_id,
// if non-scheduled outgoing message has identifier one greater than last_read_inbox_message_id,
// then definitely there are no unread incoming messages before it
if (message_id.is_server() && d->last_read_inbox_message_id.is_valid() &&
d->last_read_inbox_message_id.is_server() &&
@ -33263,9 +33264,10 @@ bool MessagesManager::update_message(Dialog *d, Message *old_message, unique_ptr
CHECK(!is_scheduled);
if (old_message->notification_id.is_valid()) {
if (new_message->notification_id.is_valid()) {
LOG(ERROR) << "Notification id for " << message_id << " in " << dialog_id << " has tried to change from "
<< old_message->notification_id << " to " << new_message->notification_id
<< ", message content type is " << old_content_type << '/' << new_content_type;
LOG(ERROR) << "Notification identifier for " << message_id << " in " << dialog_id
<< " has tried to change from " << old_message->notification_id << " to "
<< new_message->notification_id << ", message content type is " << old_content_type << '/'
<< new_content_type;
}
} else {
CHECK(new_message->notification_id.is_valid());
@ -33945,11 +33947,11 @@ void MessagesManager::fix_new_dialog(Dialog *d, unique_ptr<Message> &&last_datab
}
if (being_added_dialog_id_ != dialog_id && !d->is_folder_id_inited && !td_->auth_manager_->is_bot() &&
order != DEFAULT_ORDER) {
// asynchronously get dialog folder id from the server
// asynchronously get dialog folder identifier from the server
get_dialog_info_full(dialog_id, Auto());
}
if (!d->is_message_ttl_setting_inited && !td_->auth_manager_->is_bot() && order != DEFAULT_ORDER) {
// asynchronously get dialog message ttl setting from the server
// asynchronously get dialog message TTL setting from the server
get_dialog_info_full(dialog_id, Auto());
}
if (!d->know_action_bar && !td_->auth_manager_->is_bot() && dialog_type != DialogType::SecretChat &&

View File

@ -1091,7 +1091,7 @@ class MessagesManager : public Actor {
int32 ttl_period = 0; // counted from message send date
int32 ttl = 0; // counted from message content view date
double ttl_expires_at = 0; // only for ttl
double ttl_expires_at = 0; // only for TTL
int64 media_album_id = 0;

View File

@ -249,7 +249,8 @@ void NotificationManager::init() {
VLOG(notifications) << "Load call_notification_group_ids = " << call_notification_group_ids;
for (auto &group_id : call_notification_group_ids) {
if (group_id.get() > current_notification_group_id_.get()) {
LOG(ERROR) << "Fix current notification group id from " << current_notification_group_id_ << " to " << group_id;
LOG(ERROR) << "Fix current notification group identifier from " << current_notification_group_id_ << " to "
<< group_id;
current_notification_group_id_ = group_id;
G()->td_db()->get_binlog_pmc()->set("notification_group_id_current",
to_string(current_notification_group_id_.get()));
@ -413,14 +414,15 @@ NotificationManager::NotificationGroups::iterator NotificationManager::get_group
group_key.last_notification_date = notification.date;
}
if (notification.notification_id.get() > current_notification_id_.get()) {
LOG(ERROR) << "Fix current notification id from " << current_notification_id_ << " to "
LOG(ERROR) << "Fix current notification identifier from " << current_notification_id_ << " to "
<< notification.notification_id;
current_notification_id_ = notification.notification_id;
G()->td_db()->get_binlog_pmc()->set("notification_id_current", to_string(current_notification_id_.get()));
}
}
if (group_id.get() > current_notification_group_id_.get()) {
LOG(ERROR) << "Fix current notification group id from " << current_notification_group_id_ << " to " << group_id;
LOG(ERROR) << "Fix current notification group identifier from " << current_notification_group_id_ << " to "
<< group_id;
current_notification_group_id_ = group_id;
G()->td_db()->get_binlog_pmc()->set("notification_group_id_current",
to_string(current_notification_group_id_.get()));
@ -735,7 +737,7 @@ NotificationId NotificationManager::get_next_notification_id() {
return NotificationId();
}
if (current_notification_id_.get() == std::numeric_limits<int32>::max()) {
LOG(ERROR) << "Notification id overflowed";
LOG(ERROR) << "Notification identifier overflowed";
return NotificationId();
}
@ -749,7 +751,7 @@ NotificationGroupId NotificationManager::get_next_notification_group_id() {
return NotificationGroupId();
}
if (current_notification_group_id_.get() == std::numeric_limits<int32>::max()) {
LOG(ERROR) << "Notification group id overflowed";
LOG(ERROR) << "Notification group identifier overflowed";
return NotificationGroupId();
}

View File

@ -746,7 +746,7 @@ void answer_shipping_query(int64 shipping_query_id, vector<tl_object_ptr<td_api:
return promise.set_error(Status::Error(400, "Shipping option must be non-empty"));
}
if (!clean_input_string(option->id_)) {
return promise.set_error(Status::Error(400, "Shipping option id must be encoded in UTF-8"));
return promise.set_error(Status::Error(400, "Shipping option identifier must be encoded in UTF-8"));
}
if (!clean_input_string(option->title_)) {
return promise.set_error(Status::Error(400, "Shipping option title must be encoded in UTF-8"));
@ -836,7 +836,7 @@ void send_payment_form(ServerMessageId server_message_id, const string &order_in
auto credentials_saved = static_cast<const td_api::inputCredentialsSaved *>(credentials.get());
auto credentials_id = credentials_saved->saved_credentials_id_;
if (!clean_input_string(credentials_id)) {
return promise.set_error(Status::Error(400, "Credentials id must be encoded in UTF-8"));
return promise.set_error(Status::Error(400, "Credentials identifier must be encoded in UTF-8"));
}
auto temp_password_state =
G()->td().get_actor_unsafe()->password_manager_->get_actor_unsafe()->get_temp_password_state_sync();

View File

@ -217,7 +217,7 @@ bool operator!=(const ProfilePhoto &lhs, const ProfilePhoto &rhs) {
}
StringBuilder &operator<<(StringBuilder &string_builder, const ProfilePhoto &profile_photo) {
return string_builder << "<id = " << profile_photo.id << ", small_file_id = " << profile_photo.small_file_id
return string_builder << "<ID = " << profile_photo.id << ", small_file_id = " << profile_photo.small_file_id
<< ", big_file_id = " << profile_photo.big_file_id
<< ", has_animation = " << profile_photo.has_animation << ">";
}
@ -709,7 +709,7 @@ Photo get_photo(FileManager *file_manager, tl_object_ptr<telegram_api::photo> &&
res.has_stickers = (photo->flags_ & telegram_api::photo::HAS_STICKERS_MASK) != 0;
if (res.is_empty()) {
LOG(ERROR) << "Receive photo with id " << res.id.get();
LOG(ERROR) << "Receive photo with identifier " << res.id.get();
res.id = -3;
}
@ -925,11 +925,11 @@ bool operator!=(const Photo &lhs, const Photo &rhs) {
}
StringBuilder &operator<<(StringBuilder &string_builder, const Photo &photo) {
string_builder << "[id = " << photo.id.get() << ", photos = " << format::as_array(photo.photos);
string_builder << "[ID = " << photo.id.get() << ", photos = " << format::as_array(photo.photos);
if (!photo.animations.empty()) {
string_builder << ", animations = " << format::as_array(photo.animations);
}
return string_builder << "]";
return string_builder << ']';
}
static tl_object_ptr<telegram_api::fileLocationToBeDeprecated> copy_location(

View File

@ -82,7 +82,7 @@ static StringBuilder &operator<<(StringBuilder &string_builder, const InlineKeyb
string_builder << "Buy";
break;
case InlineKeyboardButton::Type::UrlAuth:
string_builder << "UrlAuth, id = " << keyboard_button.id;
string_builder << "UrlAuth, ID = " << keyboard_button.id;
break;
case InlineKeyboardButton::Type::CallbackWithPassword:
string_builder << "CallbackWithPassword";

View File

@ -646,7 +646,7 @@ void SecretChatActor::run_fill_gaps() {
void SecretChatActor::run_pfs() {
while (true) {
LOG(INFO) << "Run pfs loop: " << pfs_state_;
LOG(INFO) << "Run PFS loop: " << pfs_state_;
if (pfs_state_.state == PfsState::Empty &&
(pfs_state_.last_message_id + 100 < seq_no_state_.message_id ||
pfs_state_.last_timestamp + 60 * 60 * 24 * 7 < Time::now()) &&
@ -1078,7 +1078,7 @@ void SecretChatActor::do_outbound_message_impl(unique_ptr<log_event::OutboundSec
binlog_event->crc = crc64(binlog_event->encrypted_message.as_slice());
LOG(INFO) << "Do outbound message: " << *binlog_event << tag("crc", binlog_event->crc);
auto &state_id_ref = random_id_to_outbound_message_state_token_[binlog_event->random_id];
LOG_CHECK(state_id_ref == 0) << "Random id collision";
LOG_CHECK(state_id_ref == 0) << "Random ID collision";
state_id_ref = outbound_message_states_.create();
const uint64 state_id = state_id_ref;
auto *state = outbound_message_states_.get(state_id);
@ -2283,9 +2283,9 @@ Status SecretChatActor::on_inbound_action(secret_api::DecryptedMessageAction &ac
// Also, if SeqNoState with message_id greater than current message_id is not saved, then corresponding action will be
// replayed.
//
// This works only for ttl, not for pfs. Same ttl action may be processed twice.
// This works only for TTL, not for PFS. Same TTL action may be processed twice.
if (message_id < seq_no_state_.message_id) {
LOG(INFO) << "Drop old inbound DecryptedMessageAction (non-pfs action): " << to_string(action);
LOG(INFO) << "Drop old inbound DecryptedMessageAction (non-PFS action): " << to_string(action);
return Status::OK();
}
pfs_state_.message_id = message_id; // replay protection
@ -2305,7 +2305,7 @@ void SecretChatActor::on_outbound_action(secret_api::DecryptedMessageAction &act
// see comment in on_inbound_action
if (message_id < seq_no_state_.message_id) {
LOG(INFO) << "Drop old outbound DecryptedMessageAction (non-pfs action): " << to_string(action);
LOG(INFO) << "Drop old outbound DecryptedMessageAction (non-PFS action): " << to_string(action);
return;
}
pfs_state_.message_id = message_id; // replay protection

View File

@ -2079,7 +2079,7 @@ FileId StickersManager::dup_sticker(FileId new_id, FileId old_id) {
bool StickersManager::merge_stickers(FileId new_id, FileId old_id, bool can_delete_old) {
if (!old_id.is_valid()) {
LOG(ERROR) << "Old file id is invalid";
LOG(ERROR) << "Old file identifier is invalid";
return true;
}
@ -2674,7 +2674,7 @@ StickerSetId StickersManager::on_get_messages_sticker_set(StickerSetId sticker_s
for (int64 document_id : pack->documents_) {
auto it = document_id_to_sticker_id.find(document_id);
if (it == document_id_to_sticker_id.end()) {
LOG(ERROR) << "Can't find document with id " << document_id << " in " << set_id << "/" << s->short_name
LOG(ERROR) << "Can't find document with ID " << document_id << " in " << set_id << "/" << s->short_name
<< " from " << source;
continue;
}

View File

@ -3349,7 +3349,7 @@ DbKey Td::as_db_key(string key) {
void Td::request(uint64 id, tl_object_ptr<td_api::Function> function) {
if (id == 0) {
LOG(ERROR) << "Ignore request with id == 0: " << to_string(function);
LOG(ERROR) << "Ignore request with ID == 0: " << to_string(function);
return;
}

View File

@ -1088,7 +1088,7 @@ vector<DialogId> UpdatesManager::get_chat_dialog_ids(const telegram_api::Updates
continue;
}
LOG(ERROR) << "Can't find id of " << oneline(to_string(chat));
LOG(ERROR) << "Can't find identifier of " << oneline(to_string(chat));
}
return dialog_ids;
}

View File

@ -84,7 +84,7 @@ bool operator!=(const Venue &lhs, const Venue &rhs) {
StringBuilder &operator<<(StringBuilder &string_builder, const Venue &venue) {
return string_builder << "Venue[location = " << venue.location_ << ", title = " << venue.title_
<< ", address = " << venue.address_ << ", provider = " << venue.provider_
<< ", id = " << venue.id_ << ", type = " << venue.type_ << "]";
<< ", ID = " << venue.id_ << ", type = " << venue.type_ << "]";
}
Result<Venue> process_input_message_venue(tl_object_ptr<td_api::InputMessageContent> &&input_message_content) {

View File

@ -112,7 +112,7 @@ FileId VideoNotesManager::dup_video_note(FileId new_id, FileId old_id) {
bool VideoNotesManager::merge_video_notes(FileId new_id, FileId old_id, bool can_delete_old) {
if (!old_id.is_valid()) {
LOG(ERROR) << "Old file id is invalid";
LOG(ERROR) << "Old file identifier is invalid";
return true;
}

View File

@ -152,7 +152,7 @@ FileId VideosManager::dup_video(FileId new_id, FileId old_id) {
bool VideosManager::merge_videos(FileId new_id, FileId old_id, bool can_delete_old) {
if (!old_id.is_valid()) {
LOG(ERROR) << "Old file id is invalid";
LOG(ERROR) << "Old file identifier is invalid";
return true;
}

View File

@ -88,7 +88,7 @@ FileId VoiceNotesManager::dup_voice_note(FileId new_id, FileId old_id) {
bool VoiceNotesManager::merge_voice_notes(FileId new_id, FileId old_id, bool can_delete_old) {
if (!old_id.is_valid()) {
LOG(ERROR) << "Old file id is invalid";
LOG(ERROR) << "Old file identifier is invalid";
return true;
}

View File

@ -1037,7 +1037,7 @@ WebPageId WebPagesManager::get_web_page_by_url(const string &url) const {
return WebPageId();
}
LOG(INFO) << "Get web page id for the url \"" << url << '"';
LOG(INFO) << "Get web page identifier for the url \"" << url << '"';
auto it = url_to_web_page_id_.find(url);
if (it != url_to_web_page_id_.end()) {
@ -1048,7 +1048,7 @@ WebPageId WebPagesManager::get_web_page_by_url(const string &url) const {
}
WebPageId WebPagesManager::get_web_page_by_url(const string &url, Promise<Unit> &&promise) {
LOG(INFO) << "Trying to get web page id for the url \"" << url << '"';
LOG(INFO) << "Trying to get web page identifier for the url \"" << url << '"';
auto it = url_to_web_page_id_.find(url);
if (it != url_to_web_page_id_.end()) {

View File

@ -295,7 +295,7 @@ class CliClient final : public Actor {
void update_option(const td_api::updateOption &option) {
if (option.name_ == "my_id" && option.value_->get_id() == td_api::optionValueInteger::ID) {
my_id_ = static_cast<int32>(static_cast<const td_api::optionValueInteger *>(option.value_.get())->value_);
LOG(INFO) << "Set my id to " << my_id_;
LOG(INFO) << "Set my user identifier to " << my_id_;
}
}

View File

@ -275,7 +275,7 @@ class FileDb : public FileDbInterface {
if (ids.size() > 1) {
send_closure(file_db_actor_id, &FileDbActor::optimize_refs, std::move(ids), id);
}
//LOG(DEBUG) << "By id " << id.get() << " found data " << format::as_hex_dump<4>(Slice(data_str));
//LOG(DEBUG) << "By ID " << id.get() << " found data " << format::as_hex_dump<4>(Slice(data_str));
//LOG(INFO) << attempt_count;
log_event::WithVersion<TlParser> parser(data_str);
@ -292,7 +292,7 @@ class FileDb : public FileDbInterface {
static Result<FileDbId> get_id(SqliteKeyValue &pmc, const string &key) TD_WARN_UNUSED_RESULT {
auto id_str = pmc.get(key);
//LOG(DEBUG) << "Found id " << id_str << " by key " << format::as_hex_dump<4>(Slice(key));
//LOG(DEBUG) << "Found ID " << id_str << " by key " << format::as_hex_dump<4>(Slice(key));
if (id_str.empty()) {
return Status::Error("There is no such a key in database");
}

View File

@ -413,7 +413,7 @@ void FileGenerateManager::generate_file(uint64 query_id, FullGenerateFileLocatio
CHECK(query_id != 0);
auto it_flag = query_id_to_query_.emplace(query_id, Query{});
LOG_CHECK(it_flag.second) << "Query id must be unique";
LOG_CHECK(it_flag.second) << "Query identifier must be unique";
auto parent = actor_shared(this, query_id);
Slice file_id_query = "#file_id#";

View File

@ -110,7 +110,7 @@ struct PhotoRemoteFileLocation {
};
inline StringBuilder &operator<<(StringBuilder &string_builder, const PhotoRemoteFileLocation &location) {
return string_builder << "[id = " << location.id_ << ", access_hash = " << location.access_hash_
return string_builder << "[ID = " << location.id_ << ", access_hash = " << location.access_hash_
<< ", volume_id = " << location.volume_id_ << ", local_id = " << location.local_id_ << "]";
}
@ -173,7 +173,7 @@ struct CommonRemoteFileLocation {
};
inline StringBuilder &operator<<(StringBuilder &string_builder, const CommonRemoteFileLocation &location) {
return string_builder << "[id = " << location.id_ << ", access_hash = " << location.access_hash_ << "]";
return string_builder << "[ID = " << location.id_ << ", access_hash = " << location.access_hash_ << "]";
}
class FullRemoteFileLocation {

View File

@ -1422,7 +1422,8 @@ Result<FileId> FileManager::merge(FileId x_file_id, FileId y_file_id, bool no_sy
}
FileNodePtr x_node = no_sync ? get_file_node(x_file_id) : get_sync_file_node(x_file_id);
if (!x_node) {
return Status::Error(PSLICE() << "Can't merge files. First id is invalid: " << x_file_id << " and " << y_file_id);
return Status::Error(PSLICE() << "Can't merge files. First identifier is invalid: " << x_file_id << " and "
<< y_file_id);
}
if (!y_file_id.is_valid()) {
@ -1431,7 +1432,8 @@ Result<FileId> FileManager::merge(FileId x_file_id, FileId y_file_id, bool no_sy
}
FileNodePtr y_node = get_file_node(y_file_id);
if (!y_node) {
return Status::Error(PSLICE() << "Can't merge files. Second id is invalid: " << x_file_id << " and " << y_file_id);
return Status::Error(PSLICE() << "Can't merge files. Second identifier is invalid: " << x_file_id << " and "
<< y_file_id);
}
if (x_file_id == x_node->upload_pause_) {