Skip to content

Commit

Permalink
Fix ContactsManager::get_user.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Dec 30, 2021
1 parent 2027819 commit feffe41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion td/telegram/ContactsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13976,7 +13976,11 @@ bool ContactsManager::get_user(UserId user_id, int left_tries, Promise<Unit> &&p
}
auto r_input_user = get_input_user(user_id);
if (left_tries == 1 || r_input_user.is_error()) {
promise.set_error(r_input_user.move_as_error());
if (r_input_user.is_error()) {
promise.set_error(r_input_user.move_as_error());
} else {
promise.set_error(Status::Error(400, "User not found"));
}
return false;
}

Expand Down

0 comments on commit feffe41

Please sign in to comment.