Skip to content

Commit

Permalink
Fix leaking the user's phone in the id field of the stats.
Browse files Browse the repository at this point in the history
Improves tdlight-team#48 a bit.
  • Loading branch information
luckydonald committed Jan 17, 2021
1 parent df831c5 commit 011b573
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion telegram-bot-api/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3670,7 +3670,11 @@ std::size_t Client::get_pending_update_count() const {

ServerBotInfo Client::get_bot_info() const {
ServerBotInfo res;
res.id_ = bot_token_id_;
if (is_user_) {
res.id_ = td::to_string(my_id_);
} else {
res.id_ = bot_token_id_;
}
res.token_ = bot_token_;
auto user_info = get_user_info(my_id_);
if (user_info != nullptr) {
Expand Down

0 comments on commit 011b573

Please sign in to comment.