added `is_deleted` field in `User` type

This commit is contained in:
Giuseppe Marino 2020-11-11 01:23:02 +01:00
parent 079328dba5
commit 0c5a139146
No known key found for this signature in database
GPG Key ID: 2BC70C5463357449
1 changed files with 2 additions and 0 deletions

View File

@ -317,6 +317,8 @@ class Client::JsonUser : public Jsonable {
object("id", user_id_);
bool is_bot = user_info != nullptr && user_info->type == UserInfo::Type::Bot;
object("is_bot", td::JsonBool(is_bot));
bool is_deleted = user_info != nullptr && user_info->type == UserInfo::Type::Deleted;
object("is_deleted", td::JsonBool(is_deleted));
object("first_name", user_info == nullptr ? "" : user_info->first_name);
if (user_info != nullptr && !user_info->last_name.empty()) {
object("last_name", user_info->last_name);