From 6e4fd7be6618ebc6bd322917b3b10abc3525c6c6 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 5 Feb 2026 16:50:17 +0300 Subject: [PATCH] Add User.allows_users_to_create_topics. --- telegram-bot-api/Client.cpp | 2 ++ telegram-bot-api/Client.h | 1 + 2 files changed, 3 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index f19f6e2..b52b022 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -469,6 +469,7 @@ class Client::JsonUser final : public td::Jsonable { object("can_connect_to_business", td::JsonBool(user_info->can_connect_to_business)); object("has_main_web_app", td::JsonBool(user_info->has_main_web_app)); object("has_topics_enabled", td::JsonBool(user_info->has_topics)); + object("allows_users_to_create_topics", td::JsonBool(user_info->allows_users_to_create_topics)); } } @@ -15752,6 +15753,7 @@ void Client::add_user(UserInfo *user_info, object_ptr &&user) { user_info->can_connect_to_business = bot->can_connect_to_business_; user_info->has_main_web_app = bot->has_main_web_app_; user_info->has_topics = bot->has_topics_; + user_info->allows_users_to_create_topics = bot->allows_users_to_create_topics_; break; } case td_api::userTypeDeleted::ID: diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 66bebcc..020b13d 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -1017,6 +1017,7 @@ class Client final : public WebhookActor::Callback { bool is_premium = false; bool added_to_attachment_menu = false; bool has_topics = false; + bool allows_users_to_create_topics = false; }; static void add_user(UserInfo *user_info, object_ptr &&user); UserInfo *add_user_info(int64 user_id);