Add missed calls to get_user_id_object.
GitOrigin-RevId: 9a305bc6da356ee0eef3dba9c18eb8e72b0ae794
This commit is contained in:
parent
5262bfa623
commit
40fa9f1798
@ -563,6 +563,9 @@ void CallActor::flush_call_state() {
|
||||
return;
|
||||
}
|
||||
call_state_need_flush_ = false;
|
||||
|
||||
// can't call const function
|
||||
// send_closure(G()->contacts_manager(), &ContactsManager::get_user_id_object, user_id_);
|
||||
send_closure(G()->td(), &Td::send_update,
|
||||
make_tl_object<td_api::updateCall>(
|
||||
make_tl_object<td_api::call>(local_call_id_.get(), is_outgoing_ ? user_id_.get() : call_admin_id_,
|
||||
|
@ -3242,6 +3242,10 @@ void ContactsManager::on_load_imported_contacts_from_database(string value) {
|
||||
void ContactsManager::on_load_imported_contacts_finished() {
|
||||
LOG(INFO) << "Finished to load " << all_imported_contacts_.size() << " imported contacts";
|
||||
|
||||
for (const auto &contact : all_imported_contacts_) {
|
||||
get_user_id_object(contact.get_user_id()); // to ensure updateUser
|
||||
}
|
||||
|
||||
are_imported_contacts_loaded_ = true;
|
||||
auto promises = std::move(load_imported_contacts_queries_);
|
||||
load_imported_contacts_queries_.clear();
|
||||
@ -4324,6 +4328,7 @@ void ContactsManager::on_imported_contacts(int64 random_id, vector<UserId> impor
|
||||
std::unordered_map<size_t, int32> unique_id_to_unimported_contact_invites;
|
||||
for (size_t i = 0; i < add_size; i++) {
|
||||
auto unique_id = imported_contacts_pos_[i];
|
||||
get_user_id_object(imported_contact_user_ids[i]); // to ensure updateUser
|
||||
all_imported_contacts_[unique_id].set_user_id(imported_contact_user_ids[i]);
|
||||
unique_id_to_unimported_contact_invites[unique_id] = unimported_contact_invites[i];
|
||||
}
|
||||
|
@ -20275,6 +20275,9 @@ unique_ptr<MessageContent> MessagesManager::get_message_content(FormattedText me
|
||||
}
|
||||
case telegram_api::messageMediaContact::ID: {
|
||||
auto message_contact = move_tl_object_as<telegram_api::messageMediaContact>(media);
|
||||
if (message_contact->user_id_ != 0) {
|
||||
td_->contacts_manager_->get_user_id_object(UserId(message_contact->user_id_)); // to ensure updateUser
|
||||
}
|
||||
return make_unique<MessageContact>(Contact(message_contact->phone_number_, message_contact->first_name_,
|
||||
message_contact->last_name_, message_contact->user_id_));
|
||||
}
|
||||
|
Reference in New Issue
Block a user