Skip to content

Commit 0339921

Browse files
committed
Improve some spelling.
1 parent b9f7668 commit 0339921

28 files changed

Lines changed: 78 additions & 72 deletions

‎example/cpp/td_example.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class TdExample {
6666
} else if (!are_authorized_) {
6767
process_response(client_manager_->receive(10));
6868
} else {
69-
std::cout << "Enter action [q] quit [u] check for updates and request results [c] show chats [m <id> <text>] "
70-
"send message [me] show self [l] logout: "
69+
std::cout << "Enter action [q] quit [u] check for updates and request results [c] show chats [m <chat_id> "
70+
"<text>] send message [me] show self [l] logout: "
7171
<< std::endl;
7272
std::string line;
7373
std::getline(std::cin, line);
@@ -123,7 +123,7 @@ class TdExample {
123123
}
124124
auto chats = td::move_tl_object_as<td_api::chats>(object);
125125
for (auto chat_id : chats->chat_ids_) {
126-
std::cout << "[id:" << chat_id << "] [title:" << chat_title_[chat_id] << "]" << std::endl;
126+
std::cout << "[chat_id:" << chat_id << "] [title:" << chat_title_[chat_id] << "]" << std::endl;
127127
}
128128
});
129129
}

‎td/telegram/AnimationsManager.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ FileId AnimationsManager::dup_animation(FileId new_id, FileId old_id) {
284284

285285
bool AnimationsManager::merge_animations(FileId new_id, FileId old_id, bool can_delete_old) {
286286
if (!old_id.is_valid()) {
287-
LOG(ERROR) << "Old file id is invalid";
287+
LOG(ERROR) << "Old file identifier is invalid";
288288
return true;
289289
}
290290

‎td/telegram/AudiosManager.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ FileId AudiosManager::dup_audio(FileId new_id, FileId old_id) {
111111

112112
bool AudiosManager::merge_audios(FileId new_id, FileId old_id, bool can_delete_old) {
113113
if (!old_id.is_valid()) {
114-
LOG(ERROR) << "Old file id is invalid";
114+
LOG(ERROR) << "Old file identifier is invalid";
115115
return true;
116116
}
117117

‎td/telegram/AuthManager.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void AuthManager::check_password(uint64 query_id, string password) {
308308
return on_query_error(query_id, Status::Error(8, "Call to checkAuthenticationPassword unexpected"));
309309
}
310310

311-
LOG(INFO) << "Have SRP id " << wait_password_state_.srp_id_;
311+
LOG(INFO) << "Have SRP ID " << wait_password_state_.srp_id_;
312312
on_new_query(query_id);
313313
password_ = std::move(password);
314314
start_net_query(NetQueryType::GetPassword,
@@ -569,7 +569,7 @@ void AuthManager::on_get_password_result(NetQueryPtr &result) {
569569
}
570570

571571
if (state_ == State::WaitPassword) {
572-
LOG(INFO) << "Have SRP id " << wait_password_state_.srp_id_;
572+
LOG(INFO) << "Have SRP ID " << wait_password_state_.srp_id_;
573573
auto hash = PasswordManager::get_input_check_password(password_, wait_password_state_.current_client_salt_,
574574
wait_password_state_.current_server_salt_,
575575
wait_password_state_.srp_g_, wait_password_state_.srp_p_,

‎td/telegram/ContactsManager.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3467,7 +3467,7 @@ UserId ContactsManager::load_my_id() {
34673467
return my_id;
34683468
}
34693469

3470-
LOG(ERROR) << "Wrong my id = \"" << id_string << "\" stored in database";
3470+
LOG(ERROR) << "Wrong my ID = \"" << id_string << "\" stored in database";
34713471
}
34723472
return UserId();
34733473
}
@@ -4891,7 +4891,7 @@ FolderId ContactsManager::get_secret_chat_initial_folder_id(SecretChatId secret_
48914891
}
48924892

48934893
UserId ContactsManager::get_my_id() const {
4894-
LOG_IF(ERROR, !my_id_.is_valid()) << "Wrong or unknown my id returned";
4894+
LOG_IF(ERROR, !my_id_.is_valid()) << "Wrong or unknown my ID returned";
48954895
return my_id_;
48964896
}
48974897

@@ -4901,7 +4901,7 @@ void ContactsManager::set_my_id(UserId my_id) {
49014901
LOG(ERROR) << "Already know that me is " << my_old_id << " but received userSelf with " << my_id;
49024902
}
49034903
if (!my_id.is_valid()) {
4904-
LOG(ERROR) << "Receive invalid my id " << my_id;
4904+
LOG(ERROR) << "Receive invalid my ID " << my_id;
49054905
return;
49064906
}
49074907
if (my_old_id != my_id) {

‎td/telegram/DocumentsManager.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
364364
// fix_animated_sticker_type();
365365
}
366366

367-
LOG(DEBUG) << "Receive document with id = " << id << " of type " << document_type;
367+
LOG(DEBUG) << "Receive document with ID = " << id << " of type " << document_type;
368368
if (!is_web && !DcId::is_valid(dc_id)) {
369369
LOG(ERROR) << "Wrong dc_id = " << dc_id;
370370
return {};
@@ -646,7 +646,7 @@ FileId DocumentsManager::dup_document(FileId new_id, FileId old_id) {
646646

647647
bool DocumentsManager::merge_documents(FileId new_id, FileId old_id, bool can_delete_old) {
648648
if (!old_id.is_valid()) {
649-
LOG(ERROR) << "Old file id is invalid";
649+
LOG(ERROR) << "Old file identifier is invalid";
650650
return true;
651651
}
652652

‎td/telegram/Game.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ bool operator!=(const Game &lhs, const Game &rhs) {
120120
}
121121

122122
StringBuilder &operator<<(StringBuilder &string_builder, const Game &game) {
123-
return string_builder << "Game[id = " << game.id_ << ", access_hash = " << game.access_hash_
123+
return string_builder << "Game[ID = " << game.id_ << ", access_hash = " << game.access_hash_
124124
<< ", bot = " << game.bot_user_id_ << ", short_name = " << game.short_name_
125125
<< ", title = " << game.title_ << ", description = " << game.description_
126126
<< ", photo = " << game.photo_ << ", animation_file_id = " << game.animation_file_id_ << "]";

‎td/telegram/InlineQueriesManager.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ tl_object_ptr<telegram_api::inputBotInlineMessageID> InlineQueriesManager::get_i
206206
if (!DcId::is_valid(result->dc_id_)) {
207207
return nullptr;
208208
}
209-
LOG(INFO) << "Have inline message id: " << to_string(result);
209+
LOG(INFO) << "Have inline message identifier: " << to_string(result);
210210
return result;
211211
}
212212

@@ -215,7 +215,7 @@ string InlineQueriesManager::get_inline_message_id(
215215
if (input_bot_inline_message_id == nullptr) {
216216
return string();
217217
}
218-
LOG(INFO) << "Got inline message id: " << to_string(input_bot_inline_message_id);
218+
LOG(INFO) << "Got inline message identifier: " << to_string(input_bot_inline_message_id);
219219

220220
return base64url_encode(serialize(*input_bot_inline_message_id));
221221
}

‎td/telegram/MessagesManager.cpp‎

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12606,7 +12606,7 @@ void MessagesManager::init() {
1260612606
} else if (begins_with(log_string, " local message ")) {
1260712607
log_string.remove_prefix(15);
1260812608
} else {
12609-
LOG(ERROR) << "Message id expected, found " << log_string;
12609+
LOG(ERROR) << "Message identifier expected, found " << log_string;
1261012610
continue;
1261112611
}
1261212612

@@ -13512,7 +13512,7 @@ std::pair<DialogId, unique_ptr<MessagesManager::Message>> MessagesManager::creat
1351213512
message->contains_mention || dialog_type == DialogType::User);
1351313513

1351413514
if (content_type == MessageContentType::ExpiredPhoto || content_type == MessageContentType::ExpiredVideo) {
13515-
CHECK(message->ttl == 0); // ttl is ignored/set to 0 if the message has already been expired
13515+
CHECK(message->ttl == 0); // TTL is ignored/set to 0 if the message has already been expired
1351613516
if (message->reply_markup != nullptr) {
1351713517
if (message->reply_markup->type != ReplyMarkup::Type::InlineKeyboard) {
1351813518
message->had_reply_markup = true;
@@ -13527,7 +13527,7 @@ std::pair<DialogId, unique_ptr<MessagesManager::Message>> MessagesManager::creat
1352713527

1352813528
if (message_info.media_album_id != 0) {
1352913529
if (!is_allowed_media_group_content(content_type)) {
13530-
LOG(ERROR) << "Receive media group id " << message_info.media_album_id << " in " << message_id << " from "
13530+
LOG(ERROR) << "Receive media group identifier " << message_info.media_album_id << " in " << message_id << " from "
1353113531
<< dialog_id << " with content "
1353213532
<< oneline(to_string(
1353313533
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
1361613616
if (message_id <= d->last_new_message_id) {
1361713617
if (get_message_force(d, message_id, "receive missed unsent message not from update") != nullptr) {
1361813618
LOG(ERROR) << "New " << old_message_id << "/" << message_id << " in " << dialog_id << " from " << source
13619-
<< " has id less than last_new_message_id = " << d->last_new_message_id;
13619+
<< " has identifier less than last_new_message_id = " << d->last_new_message_id;
1362013620
return FullMessageId();
1362113621
}
1362213622
// if there is no message yet, then it is likely was missed because of a server bug and is being repaired via
1362313623
// get_message_from_server from after_get_difference
1362413624
// TODO move to INFO
1362513625
LOG(ERROR) << "Receive " << old_message_id << "/" << message_id << " in " << dialog_id << " from " << source
13626-
<< " with id less than last_new_message_id = " << d->last_new_message_id
13626+
<< " with identifier less than last_new_message_id = " << d->last_new_message_id
1362713627
<< " and trying to add it anyway";
1362813628
} else {
1362913629
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
1488014880
CHECK(!message_id.is_scheduled());
1488114881
MessagesConstIterator it(d, message_id);
1488214882
auto &group_info = from_mentions ? d->mention_notification_group : d->message_notification_group;
14883-
VLOG(notifications) << "Trying to fix last notification id in " << group_info.group_id << " from " << d->dialog_id
14884-
<< " from " << message_id << "/" << group_info.last_notification_id;
14883+
VLOG(notifications) << "Trying to fix last notification identifier in " << group_info.group_id << " from "
14884+
<< d->dialog_id << " from " << message_id << "/" << group_info.last_notification_id;
1488514885
if (*it != nullptr && ((*it)->message_id == message_id || (*it)->have_next)) {
1488614886
while (*it != nullptr) {
1488714887
const Message *m = *it;
@@ -25849,7 +25849,8 @@ unique_ptr<MessagesManager::MessageForwardInfo> MessagesManager::get_message_for
2584925849
if (forward_header->from_id_ != nullptr) {
2585025850
sender_dialog_id = DialogId(forward_header->from_id_);
2585125851
if (!sender_dialog_id.is_valid()) {
25852-
LOG(ERROR) << "Receive invalid sender id in message forward header: " << oneline(to_string(forward_header));
25852+
LOG(ERROR) << "Receive invalid sender identifier in message forward header: "
25853+
<< oneline(to_string(forward_header));
2585325854
sender_dialog_id = DialogId();
2585425855
}
2585525856
}
@@ -27247,7 +27248,7 @@ MessagesManager::MessageNotificationGroup MessagesManager::get_message_notificat
2724727248
if (last_notification_date != group_info.last_notification_date ||
2724827249
last_notification_id != group_info.last_notification_id) {
2724927250
LOG(ERROR) << "Fix last notification date in " << d->dialog_id << " from " << group_info.last_notification_date
27250-
<< " to " << last_notification_date << " and last notification id from "
27251+
<< " to " << last_notification_date << " and last notification identifier from "
2725127252
<< group_info.last_notification_id << " to " << last_notification_id;
2725227253
set_dialog_last_notification(d->dialog_id, group_info, last_notification_date, last_notification_id,
2725327254
"get_message_notification_group_force");
@@ -27354,24 +27355,24 @@ vector<Notification> MessagesManager::get_message_notifications_from_database_fo
2735427355

2735527356
auto notification_id = m->notification_id.is_valid() ? m->notification_id : m->removed_notification_id;
2735627357
if (!notification_id.is_valid()) {
27357-
VLOG(ERROR) << "Can't find notification ID for " << m->message_id << " in " << d->dialog_id;
27358+
VLOG(ERROR) << "Can't find notification identifier for " << m->message_id << " in " << d->dialog_id;
2735827359
continue;
2735927360
}
2736027361
CHECK(m->message_id.is_valid());
2736127362

2736227363
bool is_correct = true;
2736327364
if (notification_id.get() >= from_notification_id.get()) {
2736427365
// possible if two messages has the same notification_id
27365-
LOG(ERROR) << "Have nonmonotoic notification ids: " << d->dialog_id << " " << m->message_id << " "
27366+
LOG(ERROR) << "Have nonmonotonic notification identifiers: " << d->dialog_id << " " << m->message_id << " "
2736627367
<< notification_id << " " << from_message_id << " " << from_notification_id;
2736727368
is_correct = false;
2736827369
} else {
2736927370
from_notification_id = notification_id;
2737027371
is_found = true;
2737127372
}
2737227373
if (m->message_id >= from_message_id) {
27373-
LOG(ERROR) << "Have nonmonotoic message ids: " << d->dialog_id << " " << m->message_id << " " << notification_id
27374-
<< " " << from_message_id << " " << from_notification_id;
27374+
LOG(ERROR) << "Have nonmonotonic message identifiers: " << d->dialog_id << " " << m->message_id << " "
27375+
<< notification_id << " " << from_message_id << " " << from_notification_id;
2737527376
is_correct = false;
2737627377
} else {
2737727378
from_message_id = m->message_id;
@@ -27610,7 +27611,7 @@ void MessagesManager::on_get_message_notifications_from_database(DialogId dialog
2761027611

2761127612
auto notification_id = m->notification_id.is_valid() ? m->notification_id : m->removed_notification_id;
2761227613
if (!notification_id.is_valid()) {
27613-
VLOG(ERROR) << "Can't find notification ID for " << m->message_id << " in " << d->dialog_id;
27614+
VLOG(ERROR) << "Can't find notification identifier for " << m->message_id << " in " << d->dialog_id;
2761427615
continue;
2761527616
}
2761627617
CHECK(m->message_id.is_valid());
@@ -31958,7 +31959,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
3195831959
<< d->last_new_message_id << " to " << message_id;
3195931960
}
3196031961
LOG(ERROR) << "New " << message_id << " in " << dialog_id << " from " << source
31961-
<< " has id less than last_new_message_id = " << d->last_new_message_id;
31962+
<< " has identifier less than last_new_message_id = " << d->last_new_message_id;
3196231963
dump_debug_message_op(d);
3196331964
}
3196431965
}
@@ -32404,7 +32405,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
3240432405
set_dialog_last_read_inbox_message_id(d, MessageId::min(), server_unread_count, local_unread_count, false,
3240532406
source);
3240632407
} else {
32407-
// if non-scheduled outgoing message has id one greater than last_read_inbox_message_id,
32408+
// if non-scheduled outgoing message has identifier one greater than last_read_inbox_message_id,
3240832409
// then definitely there are no unread incoming messages before it
3240932410
if (message_id.is_server() && d->last_read_inbox_message_id.is_valid() &&
3241032411
d->last_read_inbox_message_id.is_server() &&
@@ -33263,9 +33264,10 @@ bool MessagesManager::update_message(Dialog *d, Message *old_message, unique_ptr
3326333264
CHECK(!is_scheduled);
3326433265
if (old_message->notification_id.is_valid()) {
3326533266
if (new_message->notification_id.is_valid()) {
33266-
LOG(ERROR) << "Notification id for " << message_id << " in " << dialog_id << " has tried to change from "
33267-
<< old_message->notification_id << " to " << new_message->notification_id
33268-
<< ", message content type is " << old_content_type << '/' << new_content_type;
33267+
LOG(ERROR) << "Notification identifier for " << message_id << " in " << dialog_id
33268+
<< " has tried to change from " << old_message->notification_id << " to "
33269+
<< new_message->notification_id << ", message content type is " << old_content_type << '/'
33270+
<< new_content_type;
3326933271
}
3327033272
} else {
3327133273
CHECK(new_message->notification_id.is_valid());
@@ -33945,11 +33947,11 @@ void MessagesManager::fix_new_dialog(Dialog *d, unique_ptr<Message> &&last_datab
3394533947
}
3394633948
if (being_added_dialog_id_ != dialog_id && !d->is_folder_id_inited && !td_->auth_manager_->is_bot() &&
3394733949
order != DEFAULT_ORDER) {
33948-
// asynchronously get dialog folder id from the server
33950+
// asynchronously get dialog folder identifier from the server
3394933951
get_dialog_info_full(dialog_id, Auto());
3395033952
}
3395133953
if (!d->is_message_ttl_setting_inited && !td_->auth_manager_->is_bot() && order != DEFAULT_ORDER) {
33952-
// asynchronously get dialog message ttl setting from the server
33954+
// asynchronously get dialog message TTL setting from the server
3395333955
get_dialog_info_full(dialog_id, Auto());
3395433956
}
3395533957
if (!d->know_action_bar && !td_->auth_manager_->is_bot() && dialog_type != DialogType::SecretChat &&

‎td/telegram/MessagesManager.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ class MessagesManager : public Actor {
10911091

10921092
int32 ttl_period = 0; // counted from message send date
10931093
int32 ttl = 0; // counted from message content view date
1094-
double ttl_expires_at = 0; // only for ttl
1094+
double ttl_expires_at = 0; // only for TTL
10951095

10961096
int64 media_album_id = 0;
10971097

0 commit comments

Comments
 (0)