Improve error messages.

This commit is contained in:
levlam 2023-07-05 16:18:45 +03:00
parent aed9823659
commit a8c1b24318
2 changed files with 6 additions and 6 deletions

View File

@ -1332,9 +1332,9 @@ void AuthManager::on_result(NetQueryPtr result) {
return;
}
if (result->error().message() == CSlice("PHONE_NUMBER_BANNED")) {
LOG(PLAIN)
<< "Your phone number was banned for suspicious activity. If you think that this is a mistake, please "
"write to recover@telegram.org your phone number and other details to recover the account.";
LOG(ERROR) << "Your phone number was banned for suspicious activity. If you think that this is a mistake, "
"please try to log in from an official mobile app and send a email to recover the account by "
"following instructions provided by the app.";
}
if (type != NetQueryType::LogOut && type != NetQueryType::DeleteAccount) {
if (query_id_ != 0) {

View File

@ -955,9 +955,9 @@ void Session::on_message_result_error(uint64 message_id, int error_code, string
error_code = 500;
} else {
if (message == "USER_DEACTIVATED_BAN") {
LOG(PLAIN)
<< "Your account was suspended for suspicious activity. If you think that this is a mistake, please "
"write to recover@telegram.org your phone number and other details to recover the account.";
LOG(ERROR) << "Your phone number was banned for suspicious activity. If you think that this is a mistake, "
"please try to log in from an official mobile app and send a email to recover the account by "
"following instructions provided by the app.";
}
auth_data_.set_auth_flag(false);
G()->log_out(message);