From 704a4272dd6d65c654cbefd45b88defb684cd6ad Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 13 Nov 2023 18:56:15 +0300 Subject: [PATCH] Add Chat.has_visible_history. --- 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 ac5e542..ca9f0c0 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -800,6 +800,9 @@ class Client::JsonChat final : public td::Jsonable { if (supergroup_info->can_set_sticker_set) { object("can_set_sticker_set", td::JsonTrue()); } + if (supergroup_info->is_all_history_available) { + object("has_visible_history", td::JsonTrue()); + } if (supergroup_info->is_supergroup) { object("permissions", JsonChatPermissions(chat_info->permissions.get())); } @@ -5332,6 +5335,7 @@ void Client::on_update(object_ptr result) { full_info->invite_link_ != nullptr ? std::move(full_info->invite_link_->invite_link_) : td::string()); supergroup_info->sticker_set_id = full_info->sticker_set_id_; supergroup_info->can_set_sticker_set = full_info->can_set_sticker_set_; + supergroup_info->is_all_history_available = full_info->is_all_history_available_; supergroup_info->slow_mode_delay = full_info->slow_mode_delay_; supergroup_info->linked_chat_id = full_info->linked_chat_id_; supergroup_info->location = std::move(full_info->location_); diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index f7cb107..c5a5b05 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -760,6 +760,7 @@ class Client final : public WebhookActor::Callback { bool is_supergroup = false; bool is_forum = false; bool can_set_sticker_set = false; + bool is_all_history_available = false; bool has_location = false; bool join_to_send_messages = false; bool join_by_request = false;