From fd7489f6da3e42740563fb4fcb0dbb355b254088 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 11 May 2022 19:46:07 +0300 Subject: [PATCH] Add the field User.added_to_attachment_menu. --- telegram-bot-api/Client.cpp | 4 ++++ telegram-bot-api/Client.h | 1 + 2 files changed, 5 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 2616f1a..ea8e2f1 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -348,6 +348,9 @@ class Client::JsonUser final : public Jsonable { if (user_info != nullptr && !user_info->language_code.empty()) { object("language_code", user_info->language_code); } + if (user_info != nullptr && user_info->added_to_attachment_menu) { + object("added_to_attachment_menu", td::JsonTrue()); + } if (is_bot && full_bot_info_) { object("can_join_groups", td::JsonBool(user_info->can_join_groups)); object("can_read_all_group_messages", td::JsonBool(user_info->can_read_all_group_messages)); @@ -8883,6 +8886,7 @@ void Client::add_user(UserInfo *user_info, object_ptr &&user) { user_info->language_code = std::move(user->language_code_); user_info->have_access = user->have_access_; + user_info->added_to_attachment_menu = user->added_to_attachment_menu_; switch (user->type_->get_id()) { case td_api::userTypeRegular::ID: diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 2d6edc4..1168835 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -615,6 +615,7 @@ class Client final : public WebhookActor::Callback { bool can_read_all_group_messages = false; bool is_inline_bot = false; bool has_private_forwards = false; + bool added_to_attachment_menu = false; }; static void add_user(UserInfo *user_info, object_ptr &&user); void set_user_photo(int64 user_id, object_ptr &&photo);