Improve captured actor_id names.

This commit is contained in:
levlam 2021-10-07 13:38:49 +03:00
parent b34cfef4d0
commit c85f993de8
2 changed files with 15 additions and 16 deletions

View File

@ -9680,16 +9680,16 @@ void ContactsManager::update_user(User *u, UserId user_id, bool from_binlog, boo
} }
} }
if (u->is_name_changed) { if (u->is_name_changed) {
td_->messages_manager_->on_dialog_title_updated(DialogId(user_id)); auto messages_manager = td_->messages_manager_.get();
for_each_secret_chat_with_user(user_id, messages_manager->on_dialog_title_updated(DialogId(user_id));
[messages_manager = td_->messages_manager_.get()](SecretChatId secret_chat_id) { for_each_secret_chat_with_user(user_id, [messages_manager](SecretChatId secret_chat_id) {
messages_manager->on_dialog_title_updated(DialogId(secret_chat_id)); messages_manager->on_dialog_title_updated(DialogId(secret_chat_id));
}); });
} }
if (u->is_photo_changed) { if (u->is_photo_changed) {
td_->messages_manager_->on_dialog_photo_updated(DialogId(user_id)); auto messages_manager = td_->messages_manager_.get();
for_each_secret_chat_with_user(user_id, messages_manager->on_dialog_photo_updated(DialogId(user_id));
[messages_manager = td_->messages_manager_.get()](SecretChatId secret_chat_id) { for_each_secret_chat_with_user(user_id, [messages_manager](SecretChatId secret_chat_id) {
messages_manager->on_dialog_photo_updated(DialogId(secret_chat_id)); messages_manager->on_dialog_photo_updated(DialogId(secret_chat_id));
}); });
} }

View File

@ -226,14 +226,14 @@ void FileReferenceManager::send_query(Destination dest, FileSourceId file_source
auto &node = nodes_[dest.node_id]; auto &node = nodes_[dest.node_id];
node.query->active_queries++; node.query->active_queries++;
auto promise = PromiseCreator::lambda([dest, file_source_id, file_reference_manager = G()->file_reference_manager(), auto promise = PromiseCreator::lambda([dest, file_source_id, actor_id = actor_id(this),
file_manager = G()->file_manager()](Result<Unit> result) { file_manager_actor_id = G()->file_manager()](Result<Unit> result) {
if (G()->close_flag()) { if (G()->close_flag()) {
VLOG(file_references) << "Ignore file reference repair from " << file_source_id << " during closing"; VLOG(file_references) << "Ignore file reference repair from " << file_source_id << " during closing";
return; return;
} }
auto new_promise = PromiseCreator::lambda([dest, file_source_id, file_reference_manager](Result<Unit> result) { auto new_promise = PromiseCreator::lambda([dest, file_source_id, actor_id](Result<Unit> result) {
if (G()->close_flag()) { if (G()->close_flag()) {
VLOG(file_references) << "Ignore file reference repair from " << file_source_id << " during closing"; VLOG(file_references) << "Ignore file reference repair from " << file_source_id << " during closing";
return; return;
@ -243,11 +243,10 @@ void FileReferenceManager::send_query(Destination dest, FileSourceId file_source
if (result.is_error()) { if (result.is_error()) {
status = result.move_as_error(); status = result.move_as_error();
} }
send_closure(file_reference_manager, &FileReferenceManager::on_query_result, dest, file_source_id, send_closure(actor_id, &FileReferenceManager::on_query_result, dest, file_source_id, std::move(status), 0);
std::move(status), 0);
}); });
send_closure(file_manager, &FileManager::on_file_reference_repaired, dest.node_id, file_source_id, send_closure(file_manager_actor_id, &FileManager::on_file_reference_repaired, dest.node_id, file_source_id,
std::move(result), std::move(new_promise)); std::move(result), std::move(new_promise));
}); });
auto index = static_cast<size_t>(file_source_id.get()) - 1; auto index = static_cast<size_t>(file_source_id.get()) - 1;