From 0da8d14430dd247b09c1f59a4c12d40618873caf 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 19b76eb..a86cf10 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -894,6 +894,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())); } @@ -6038,6 +6041,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 26af317..a7089a7 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -870,6 +870,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;