From ef2d3b0b399678679c5c32d672f97bd0751e588c Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 27 May 2026 14:41:03 +0300 Subject: Add Chat.guard_bot. --- 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 72a3101..71230de 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1401,6 +1401,9 @@ class Client::JsonChat final : public td::Jsonable { if (supergroup_info->is_direct_messages && supergroup_info->direct_messages_chat_id != 0) { object("parent_chat", JsonChat(supergroup_info->direct_messages_chat_id, client_)); } + if (supergroup_info->guard_bot_user_id != 0) { + object("guard_bot", JsonUser(supergroup_info->guard_bot_user_id, client_)); + } if (supergroup_info->location != nullptr) { object("location", JsonChatLocation(supergroup_info->location.get())); } @@ -9130,6 +9133,7 @@ void Client::on_update(object_ptr result) { supergroup_info->unrestrict_boost_count = full_info->unrestrict_boost_count_; supergroup_info->linked_chat_id = full_info->linked_chat_id_; supergroup_info->direct_messages_chat_id = full_info->direct_messages_chat_id_; + supergroup_info->guard_bot_user_id = full_info->guard_bot_user_id_; supergroup_info->location = std::move(full_info->location_); supergroup_info->has_hidden_members = full_info->has_hidden_members_; supergroup_info->has_aggressive_anti_spam_enabled = full_info->has_aggressive_anti_spam_enabled_; diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index e542ad1..4655309 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -1103,6 +1103,7 @@ class Client final : public WebhookActor::Callback { int64 linked_chat_id = 0; int64 direct_messages_chat_id = 0; int64 paid_message_star_count = 0; + int64 guard_bot_user_id = 0; object_ptr location; object_ptr status; bool is_supergroup = false; -- cgit v1.2.3