Add Chat.personal_chat.

This commit is contained in:
levlam 2024-03-28 19:45:48 +03:00
parent 5f6e1a262f
commit c69178b298
2 changed files with 5 additions and 0 deletions

View File

@ -969,6 +969,9 @@ class Client::JsonChat final : public td::Jsonable {
if (user_info->birthdate != nullptr) {
object("birthdate", JsonBirthdate(user_info->birthdate.get()));
}
if (user_info->personal_chat_id != 0) {
object("personal_chat", JsonChat(user_info->personal_chat_id, client_));
}
}
photo = user_info->photo.get();
break;
@ -6544,6 +6547,7 @@ void Client::on_update(object_ptr<td_api::Object> result) {
user_info->bio = full_info->bio_ != nullptr ? std::move(full_info->bio_->text_) : td::string();
user_info->birthdate = std::move(full_info->birthdate_);
user_info->business_info = std::move(full_info->business_info_);
user_info->personal_chat_id = full_info->personal_chat_id_;
user_info->has_private_forwards = full_info->has_private_forwards_;
user_info->has_restricted_voice_and_video_messages = full_info->has_restricted_voice_and_video_note_messages_;
break;

View File

@ -805,6 +805,7 @@ class Client final : public WebhookActor::Callback {
td::string bio;
object_ptr<td_api::birthdate> birthdate;
object_ptr<td_api::businessInfo> business_info;
int64 personal_chat_id = 0;
bool have_access = false;
bool can_join_groups = false;