Improve BotInfo for bots with invalid tokens.
This commit is contained in:
parent
61f1e7d114
commit
11dcbb0431
1 changed files with 5 additions and 1 deletions
|
|
@ -4103,7 +4103,11 @@ ServerBotInfo Client::get_bot_info() const {
|
||||||
if (user_info != nullptr) {
|
if (user_info != nullptr) {
|
||||||
res.username_ = user_info->editable_username;
|
res.username_ = user_info->editable_username;
|
||||||
} else if (!was_authorized_) {
|
} else if (!was_authorized_) {
|
||||||
|
if (logging_out_) {
|
||||||
|
res.username_ = "<failed to authorize>";
|
||||||
|
} else {
|
||||||
res.username_ = "<unauthorized>";
|
res.username_ = "<unauthorized>";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
res.username_ = "<unknown>";
|
res.username_ = "<unknown>";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue