aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-05-27 14:41:03 +0300
committerlevlam <levlam@telegram.org>2026-05-27 14:41:03 +0300
commitef2d3b0b399678679c5c32d672f97bd0751e588c (patch)
tree4b20f1241cd4790388cc8ec888572521e05e14c8
parent56bfddd8ce348350ab7c1ee4cbdbe5e927fd2d5a (diff)
Add Chat.guard_bot.
-rw-r--r--telegram-bot-api/Client.cpp4
-rw-r--r--telegram-bot-api/Client.h1
2 files changed, 5 insertions, 0 deletions
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<td_api::Object> 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<td_api::chatLocation> location;
object_ptr<td_api::ChatMemberStatus> status;
bool is_supergroup = false;