Fix some ID spelling.
GitOrigin-RevId: cdd8cdb93696c690cf7bdb9b2df175bb926a7510
This commit is contained in:
parent
822bc95d13
commit
87afb93b93
@ -11549,7 +11549,7 @@ UserId ContactsManager::get_me(Promise<Unit> &&promise) {
|
||||
|
||||
bool ContactsManager::get_user(UserId user_id, int left_tries, Promise<Unit> &&promise) {
|
||||
if (!user_id.is_valid()) {
|
||||
promise.set_error(Status::Error(6, "Invalid user ID"));
|
||||
promise.set_error(Status::Error(6, "Invalid user identifier"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -11620,7 +11620,7 @@ ContactsManager::UserFull *ContactsManager::add_user_full(UserId user_id) {
|
||||
|
||||
void ContactsManager::reload_user(UserId user_id, Promise<Unit> &&promise) {
|
||||
if (!user_id.is_valid()) {
|
||||
return promise.set_error(Status::Error(6, "Invalid user ID"));
|
||||
return promise.set_error(Status::Error(6, "Invalid user identifier"));
|
||||
}
|
||||
|
||||
have_user_force(user_id);
|
||||
@ -11854,7 +11854,7 @@ ContactsManager::Chat *ContactsManager::add_chat(ChatId chat_id) {
|
||||
|
||||
bool ContactsManager::get_chat(ChatId chat_id, int left_tries, Promise<Unit> &&promise) {
|
||||
if (!chat_id.is_valid()) {
|
||||
promise.set_error(Status::Error(6, "Invalid basic group ID"));
|
||||
promise.set_error(Status::Error(6, "Invalid basic group identifier"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -11880,7 +11880,7 @@ bool ContactsManager::get_chat(ChatId chat_id, int left_tries, Promise<Unit> &&p
|
||||
|
||||
void ContactsManager::reload_chat(ChatId chat_id, Promise<Unit> &&promise) {
|
||||
if (!chat_id.is_valid()) {
|
||||
return promise.set_error(Status::Error(6, "Invalid basic group ID"));
|
||||
return promise.set_error(Status::Error(6, "Invalid basic group identifier"));
|
||||
}
|
||||
|
||||
// there is no much reason to combine different requests into one request
|
||||
@ -12173,7 +12173,7 @@ ContactsManager::Channel *ContactsManager::add_channel(ChannelId channel_id, con
|
||||
|
||||
bool ContactsManager::get_channel(ChannelId channel_id, int left_tries, Promise<Unit> &&promise) {
|
||||
if (!channel_id.is_valid()) {
|
||||
promise.set_error(Status::Error(6, "Invalid supergroup ID"));
|
||||
promise.set_error(Status::Error(6, "Invalid supergroup identifier"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -12199,7 +12199,7 @@ bool ContactsManager::get_channel(ChannelId channel_id, int left_tries, Promise<
|
||||
|
||||
void ContactsManager::reload_channel(ChannelId channel_id, Promise<Unit> &&promise) {
|
||||
if (!channel_id.is_valid()) {
|
||||
return promise.set_error(Status::Error(6, "Invalid supergroup ID"));
|
||||
return promise.set_error(Status::Error(6, "Invalid supergroup identifier"));
|
||||
}
|
||||
|
||||
have_channel_force(channel_id);
|
||||
@ -12332,7 +12332,7 @@ ContactsManager::SecretChat *ContactsManager::get_secret_chat(SecretChatId secre
|
||||
|
||||
bool ContactsManager::get_secret_chat(SecretChatId secret_chat_id, bool force, Promise<Unit> &&promise) {
|
||||
if (!secret_chat_id.is_valid()) {
|
||||
promise.set_error(Status::Error(6, "Invalid secret chat ID"));
|
||||
promise.set_error(Status::Error(6, "Invalid secret chat identifier"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -8809,7 +8809,7 @@ void MessagesManager::delete_dialog_history(DialogId dialog_id, bool remove_from
|
||||
|
||||
auto last_new_message_id = d->last_new_message_id;
|
||||
if (dialog_type != DialogType::SecretChat && last_new_message_id == MessageId()) {
|
||||
// TODO get dialog from the server and delete history from last message id
|
||||
// TODO get dialog from the server and delete history from last message identifier
|
||||
}
|
||||
|
||||
bool allow_error = d->messages == nullptr;
|
||||
@ -26015,7 +26015,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(DialogId dialog
|
||||
MessageId message_id = message->message_id;
|
||||
if (!message_id.is_valid() && !message_id.is_valid_scheduled()) {
|
||||
LOG(ERROR) << "Receive " << message_id << " in " << dialog_id << " from " << source;
|
||||
debug_add_message_to_dialog_fail_reason_ = "invalid message id";
|
||||
debug_add_message_to_dialog_fail_reason_ = "invalid message identifier";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -26068,7 +26068,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
|
||||
}
|
||||
LOG(ERROR) << "Receive " << message_id << " in " << dialog_id << " from " << source;
|
||||
CHECK(!message->from_database);
|
||||
debug_add_message_to_dialog_fail_reason_ = "invalid message id";
|
||||
debug_add_message_to_dialog_fail_reason_ = "invalid message identifier";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -27922,7 +27922,7 @@ void MessagesManager::fix_new_dialog(Dialog *d, unique_ptr<Message> &&last_datab
|
||||
VLOG(notifications) << "Fix removing new secret chat " << d->new_secret_chat_notification_id << " in "
|
||||
<< dialog_id;
|
||||
d->new_secret_chat_notification_id = NotificationId();
|
||||
on_dialog_updated(dialog_id, "fix new secret chat notification id");
|
||||
on_dialog_updated(dialog_id, "fix new secret chat notification identifier");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ void parse(PhotoSizeSource::DialogPhoto &source, ParserT &parser) {
|
||||
switch (source.dialog_id.get_type()) {
|
||||
case DialogType::SecretChat:
|
||||
case DialogType::None:
|
||||
return parser.set_error("Invalid chat id");
|
||||
return parser.set_error("Invalid chat identifier");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -5032,7 +5032,7 @@ void Td::on_request(uint64 id, td_api::optimizeStorage &request) {
|
||||
for (auto chat_id : request.chat_ids_) {
|
||||
DialogId dialog_id(chat_id);
|
||||
if (!dialog_id.is_valid() && dialog_id != DialogId()) {
|
||||
return send_error_raw(id, 400, "Wrong chat id");
|
||||
return send_error_raw(id, 400, "Wrong chat identifier");
|
||||
}
|
||||
owner_dialog_ids.push_back(dialog_id);
|
||||
}
|
||||
@ -5040,7 +5040,7 @@ void Td::on_request(uint64 id, td_api::optimizeStorage &request) {
|
||||
for (auto chat_id : request.exclude_chat_ids_) {
|
||||
DialogId dialog_id(chat_id);
|
||||
if (!dialog_id.is_valid() && dialog_id != DialogId()) {
|
||||
return send_error_raw(id, 400, "Wrong chat id");
|
||||
return send_error_raw(id, 400, "Wrong chat identifier");
|
||||
}
|
||||
exclude_owner_dialog_ids.push_back(dialog_id);
|
||||
}
|
||||
@ -5958,7 +5958,7 @@ void Td::on_request(uint64 id, const td_api::downloadFile &request) {
|
||||
FileId file_id(request.file_id_, 0);
|
||||
auto file_view = file_manager_->get_file_view(file_id);
|
||||
if (file_view.empty()) {
|
||||
return send_error_raw(id, 400, "Invalid file id");
|
||||
return send_error_raw(id, 400, "Invalid file identifier");
|
||||
}
|
||||
|
||||
auto info_it = pending_file_downloads_.find(file_id);
|
||||
|
@ -1944,7 +1944,7 @@ void FileManager::read_file_part(FileId file_id, int32 offset, int32 count, int
|
||||
}
|
||||
|
||||
if (!file_id.is_valid()) {
|
||||
return promise.set_error(Status::Error(400, "File ID is invalid"));
|
||||
return promise.set_error(Status::Error(400, "File identifier is invalid"));
|
||||
}
|
||||
auto node = get_sync_file_node(file_id);
|
||||
if (!node) {
|
||||
@ -2446,7 +2446,7 @@ void FileManager::resume_upload(FileId file_id, std::vector<int> bad_parts, std:
|
||||
bool FileManager::delete_partial_remote_location(FileId file_id) {
|
||||
auto node = get_sync_file_node(file_id);
|
||||
if (!node) {
|
||||
LOG(INFO) << "Wrong file id " << file_id;
|
||||
LOG(INFO) << "Wrong file identifier " << file_id;
|
||||
return false;
|
||||
}
|
||||
if (node->upload_pause_ == file_id) {
|
||||
@ -2482,7 +2482,7 @@ void FileManager::delete_file_reference(FileId file_id, string file_reference) {
|
||||
<< tag("reference_base64", base64_encode(file_reference));
|
||||
auto node = get_sync_file_node(file_id);
|
||||
if (!node) {
|
||||
LOG(ERROR) << "Wrong file id " << file_id;
|
||||
LOG(ERROR) << "Wrong file identifier " << file_id;
|
||||
return;
|
||||
}
|
||||
node->delete_file_reference(file_reference);
|
||||
@ -2765,11 +2765,11 @@ Result<FileId> FileManager::from_persistent_id(CSlice persistent_id, FileType fi
|
||||
|
||||
auto r_binary = base64url_decode(persistent_id);
|
||||
if (r_binary.is_error()) {
|
||||
return Status::Error(10, PSLICE() << "Wrong remote file id specified: " << r_binary.error().message());
|
||||
return Status::Error(10, PSLICE() << "Wrong remote file identifier specified: " << r_binary.error().message());
|
||||
}
|
||||
auto binary = r_binary.move_as_ok();
|
||||
if (binary.empty()) {
|
||||
return Status::Error(10, "Remote file id can't be empty");
|
||||
return Status::Error(10, "Remote file identifier can't be empty");
|
||||
}
|
||||
if (binary.back() == PERSISTENT_ID_VERSION_OLD) {
|
||||
return from_persistent_id_v2(binary, file_type);
|
||||
@ -2780,7 +2780,7 @@ Result<FileId> FileManager::from_persistent_id(CSlice persistent_id, FileType fi
|
||||
if (binary.back() == PERSISTENT_ID_VERSION_MAP) {
|
||||
return from_persistent_id_map(binary, file_type);
|
||||
}
|
||||
return Status::Error(10, "Wrong remote file id specified: can't unserialize it. Wrong last symbol");
|
||||
return Status::Error(10, "Wrong remote file identifier specified: can't unserialize it. Wrong last symbol");
|
||||
}
|
||||
|
||||
Result<FileId> FileManager::from_persistent_id_map(Slice binary, FileType file_type) {
|
||||
@ -2789,7 +2789,7 @@ Result<FileId> FileManager::from_persistent_id_map(Slice binary, FileType file_t
|
||||
FullGenerateFileLocation generate_location;
|
||||
auto status = unserialize(generate_location, decoded_binary);
|
||||
if (status.is_error()) {
|
||||
return Status::Error(10, "Wrong remote file id specified: can't unserialize it");
|
||||
return Status::Error(10, "Wrong remote file identifier specified: can't unserialize it");
|
||||
}
|
||||
auto real_file_type = generate_location.file_type_;
|
||||
if ((real_file_type != file_type && file_type != FileType::Temp) ||
|
||||
@ -2806,7 +2806,7 @@ Result<FileId> FileManager::from_persistent_id_map(Slice binary, FileType file_t
|
||||
|
||||
Result<FileId> FileManager::from_persistent_id_v23(Slice binary, FileType file_type, int32 version) {
|
||||
if (version < 0 || version >= static_cast<int32>(Version::Next)) {
|
||||
return Status::Error("Invalid remote id");
|
||||
return Status::Error("Invalid remote file identifier");
|
||||
}
|
||||
auto decoded_binary = zero_decode(binary);
|
||||
FullRemoteFileLocation remote_location;
|
||||
@ -2816,7 +2816,7 @@ Result<FileId> FileManager::from_persistent_id_v23(Slice binary, FileType file_t
|
||||
parser.fetch_end();
|
||||
auto status = parser.get_status();
|
||||
if (status.is_error()) {
|
||||
return Status::Error(10, "Wrong remote file id specified: can't unserialize it");
|
||||
return Status::Error(10, "Wrong remote file identifier specified: can't unserialize it");
|
||||
}
|
||||
auto &real_file_type = remote_location.file_type_;
|
||||
if (is_document_type(real_file_type) && is_document_type(file_type)) {
|
||||
@ -2841,7 +2841,7 @@ Result<FileId> FileManager::from_persistent_id_v2(Slice binary, FileType file_ty
|
||||
Result<FileId> FileManager::from_persistent_id_v3(Slice binary, FileType file_type) {
|
||||
binary.remove_suffix(1);
|
||||
if (binary.empty()) {
|
||||
return Status::Error("Invalid remote id");
|
||||
return Status::Error("Invalid remote file identifier");
|
||||
}
|
||||
int32 version = static_cast<uint8>(binary.back());
|
||||
binary.remove_suffix(1);
|
||||
|
@ -122,7 +122,7 @@ Status NetQueryDispatcher::wait_dc_init(DcId dc_id, bool force) {
|
||||
}
|
||||
size_t pos = static_cast<size_t>(dc_id.get_raw_id() - 1);
|
||||
if (pos >= dcs_.size()) {
|
||||
return Status::Error("Too big DC id");
|
||||
return Status::Error("Too big DC ID");
|
||||
}
|
||||
auto &dc = dcs_[pos];
|
||||
|
||||
|
@ -839,7 +839,7 @@ void Session::on_message_info(uint64 id, int32 state, uint64 answer_id, int32 an
|
||||
case 2:
|
||||
case 3:
|
||||
// message not received by server
|
||||
return on_message_failed(id, Status::Error("Unknown message id"));
|
||||
return on_message_failed(id, Status::Error("Unknown message identifier"));
|
||||
case 0:
|
||||
if (answer_id == 0) {
|
||||
LOG(ERROR) << "Unexpected message_info.state == 0 " << tag("id", id) << tag("state", state)
|
||||
|
Reference in New Issue
Block a user